#include <C4Control.h>
Public Types | |
enum | Action { CPA_NoAction = 0 , CPA_Surrender = 0x01 , CPA_ActivateGoal = 0x02 , CPA_ActivateGoalMenu = 0x03 , CPA_Eliminate = 0x04 , CPA_SetHostility = 0x10 , CPA_SetTeam = 0x11 , CPA_InitScenarioPlayer = 0x20 , CPA_InitPlayerControl = 0x21 } |
Public Member Functions | |
C4ControlPlayerAction (const C4Player *source=nullptr) | |
int32_t | getByClient () const |
bool | LocalControl () const |
bool | HostControl () const |
void | SetByClient (int32_t iByClient) |
virtual bool | PreExecute () const |
virtual void | Execute () const =0 |
virtual void | PreRec (C4Record *pRecord) |
virtual bool | Lobby () const |
virtual bool | Sync () const |
void | CompileFunc (StdCompiler *pComp) override |
C4NetIOPacket | pack (const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const |
C4NetIOPacket | pack (uint8_t cStatus, const C4NetIO::addr_t &addr=C4NetIO::addr_t()) const |
void | unpack (const C4NetIOPacket &Pkt, char *pStatus=nullptr) |
Static Public Member Functions | |
static C4ControlPlayerAction * | Surrender (const C4Player *source) |
static C4ControlPlayerAction * | Eliminate (const C4Player *source) |
static C4ControlPlayerAction * | ActivateGoalMenu (const C4Player *source) |
static C4ControlPlayerAction * | ActivateGoal (const C4Player *source, const C4Object *target) |
static C4ControlPlayerAction * | SetHostility (const C4Player *source, const C4Player *target, bool hostile) |
static C4ControlPlayerAction * | SetTeam (const C4Player *source, int32_t team) |
static C4ControlPlayerAction * | InitScenarioPlayer (const C4Player *source, int32_t team) |
static C4ControlPlayerAction * | InitPlayerControl (const C4Player *source, const C4PlayerControlAssignmentSet *ctrl_set=nullptr) |
Protected Attributes | |
int32_t | iByClient |
Definition at line 270 of file C4Control.h.
Enumerator | |
---|---|
CPA_NoAction | |
CPA_Surrender | |
CPA_ActivateGoal | |
CPA_ActivateGoalMenu | |
CPA_Eliminate | |
CPA_SetHostility | |
CPA_SetTeam | |
CPA_InitScenarioPlayer | |
CPA_InitPlayerControl |
Definition at line 273 of file C4Control.h.
C4ControlPlayerAction::C4ControlPlayerAction | ( | const C4Player * | source = nullptr | ) |
Definition at line 552 of file C4Control.cpp.
Referenced by ActivateGoal(), ActivateGoalMenu(), Eliminate(), InitPlayerControl(), InitScenarioPlayer(), SetHostility(), SetTeam(), and Surrender().
|
static |
Definition at line 571 of file C4Control.cpp.
References C4ControlPlayerAction(), CPA_ActivateGoal, and C4PropListNumbered::Number.
Referenced by C4MainMenu::MenuCommand().
|
static |
Definition at line 580 of file C4Control.cpp.
References C4ControlPlayerAction(), and CPA_ActivateGoalMenu.
Referenced by C4MainMenu::MenuCommand().
|
overridevirtualinherited |
Implements C4PacketBase.
Definition at line 70 of file C4Control.cpp.
References C4ControlPacket::iByClient, mkIntPackAdapt(), mkNamingAdapt(), and StdCompiler::Value().
|
static |
Definition at line 564 of file C4Control.cpp.
References C4ControlPlayerAction(), and CPA_Eliminate.
Referenced by ConsoleDlgProc().
|
pure virtualinherited |
Referenced by C4GameControl::DoSyncCheck(), C4GameControl::ExecControlPacket(), and C4Control::Execute().
|
inlineinherited |
Definition at line 42 of file C4Control.h.
References C4ControlPacket::iByClient.
Referenced by C4Network2::GetVote(), C4GameControlNetwork::HandlePacket(), and C4Network2::OpenVoteDialog().
|
inlineinherited |
Definition at line 44 of file C4Control.h.
References C4ClientIDHost, and C4ControlPacket::iByClient.
|
static |
Definition at line 613 of file C4Control.cpp.
References C4ControlPlayerAction(), CPA_InitPlayerControl, C4PlayerControlAssignmentSet::GetName(), C4PlayerControlAssignmentSet::HasGamepad(), C4PlayerControlAssignmentSet::HasKeyboard(), and C4PlayerControlAssignmentSet::HasMouse().
Referenced by C4Player::InitControl().
|
static |
Definition at line 605 of file C4Control.cpp.
References C4ControlPlayerAction(), and CPA_InitScenarioPlayer.
Referenced by C4Player::DoTeamSelection().
|
inlinevirtualinherited |
Reimplemented in C4ControlMessage, C4ControlPlayerInfo, C4ControlClientRemove, C4ControlClientUpdate, C4ControlClientJoin, and C4ControlSet.
Definition at line 53 of file C4Control.h.
Referenced by C4GameControl::DoInput().
|
inherited |
Definition at line 60 of file C4Control.cpp.
References C4GameControl::ClientID(), Control, and C4ControlPacket::iByClient.
|
inherited |
Definition at line 150 of file C4Packet2.cpp.
Referenced by MkC4NetIOPacket().
|
inherited |
Definition at line 155 of file C4Packet2.cpp.
References mkDecompileAdapt(), and mkInsertAdapt().
|
inlinevirtualinherited |
Reimplemented in C4ControlJoinPlayer.
Definition at line 48 of file C4Control.h.
Referenced by C4GameControl::ExecControlPacket(), and C4Control::PreExecute().
|
inlinevirtualinherited |
Reimplemented in C4ControlJoinPlayer.
Definition at line 50 of file C4Control.h.
Referenced by C4Control::PreRec(), and C4Record::Rec().
|
inherited |
Definition at line 65 of file C4Control.cpp.
References C4ControlPacket::iByClient.
|
static |
Definition at line 587 of file C4Control.cpp.
References C4ControlPlayerAction(), CPA_SetHostility, NO_OWNER, and C4Player::Number.
Referenced by C4MainMenu::MenuCommand().
|
static |
Definition at line 597 of file C4Control.cpp.
References C4ControlPlayerAction(), and CPA_SetTeam.
Referenced by C4MainMenu::MenuCommand().
|
static |
Definition at line 557 of file C4Control.cpp.
References C4ControlPlayerAction(), and CPA_Surrender.
Referenced by C4MainMenu::MenuCommand().
|
inlinevirtualinherited |
Reimplemented in C4ControlVoteEnd, C4ControlVote, C4ControlMessage, C4ControlPlayerInfo, C4ControlClientRemove, C4ControlClientUpdate, C4ControlClientJoin, and C4ControlSyncCheck.
Definition at line 55 of file C4Control.h.
Referenced by C4Playback::Check(), and C4GameControl::DoInput().
|
inherited |
Definition at line 160 of file C4Packet2.cpp.
References C4NetIOPacket::getPBuf(), C4NetIOPacket::getRef(), and C4NetIOPacket::getStatus().
Referenced by C4IDPacket::C4IDPacket(), and C4Network2IO::HandlePacket().
|
protectedinherited |
Definition at line 39 of file C4Control.h.
Referenced by C4ControlPacket::CompileFunc(), C4ControlPacket::getByClient(), C4ControlVote::getDesc(), C4ControlPacket::HostControl(), C4ControlPacket::LocalControl(), and C4ControlPacket::SetByClient().