DDraceNetwork Docs
|
#include <character.h>
Public Member Functions | |
~CCharacter () | |
void | PreTick () override |
void | Tick () override |
void | TickDeferred () override |
bool | IsGrounded () |
void | SetWeapon (int W) |
void | SetSolo (bool Solo) |
void | SetSuper (bool Super) |
void | HandleWeaponSwitch () |
void | DoWeaponSwitch () |
void | HandleWeapons () |
void | HandleNinja () |
void | HandleJetpack () |
void | OnPredictedInput (CNetObj_PlayerInput *pNewInput) |
void | OnDirectInput (CNetObj_PlayerInput *pNewInput) |
void | ReleaseHook () |
void | ResetHook () |
void | ResetInput () |
void | FireWeapon () |
bool | TakeDamage (vec2 Force, int Dmg, int From, int Weapon) |
void | GiveWeapon (int Weapon, bool Remove=false) |
void | GiveNinja () |
void | RemoveNinja () |
void | ResetVelocity () |
void | SetVelocity (vec2 NewVelocity) |
void | SetRawVelocity (vec2 NewVelocity) |
void | AddVelocity (vec2 Addition) |
void | ApplyMoveRestrictions () |
CTeamsCore * | TeamsCore () |
bool | Freeze (int Seconds) |
bool | Freeze () |
bool | UnFreeze () |
void | GiveAllWeapons () |
int | Team () |
bool | CanCollide (int ClientId) |
bool | SameTeam (int ClientId) |
int | GetLastWeapon () |
void | SetLastWeapon (int LastWeap) |
int | GetActiveWeapon () |
void | SetActiveWeapon (int ActiveWeap) |
CCharacterCore | GetCore () |
void | SetCore (CCharacterCore Core) |
const CCharacterCore * | Core () const |
bool | GetWeaponGot (int Type) |
void | SetWeaponGot (int Type, bool Value) |
int | GetWeaponAmmo (int Type) |
void | SetWeaponAmmo (int Type, int Value) |
void | SetNinjaActivationDir (vec2 ActivationDir) |
void | SetNinjaActivationTick (int ActivationTick) |
void | SetNinjaCurrentMoveTime (int CurrentMoveTime) |
int | GetCid () |
void | SetInput (const CNetObj_PlayerInput *pNewInput) |
int | GetJumped () |
int | GetAttackTick () |
int | GetStrongWeakId () |
CCharacter (CGameWorld *pGameWorld, int Id, CNetObj_Character *pChar, CNetObj_DDNetCharacter *pExtended=0) | |
void | Read (CNetObj_Character *pChar, CNetObj_DDNetCharacter *pExtended, bool IsLocal) |
void | SetCoreWorld (CGameWorld *pGameWorld) |
bool | Match (CCharacter *pChar) const |
void | ResetPrediction () |
void | SetTuneZone (int Zone) |
bool | HammerHitDisabled () |
bool | ShotgunHitDisabled () |
bool | LaserHitDisabled () |
bool | GrenadeHitDisabled () |
bool | IsSuper () |
CCharacter (CGameWorld *pWorld, CNetObj_PlayerInput LastInput) | |
void | Reset () override |
void | Destroy () override |
void | PreTick () |
void | Tick () override |
void | TickDeferred () override |
void | TickPaused () override |
void | Snap (int SnappingClient) override |
void | PostSnap () override |
void | SwapClients (int Client1, int Client2) override |
bool | CanSnapCharacter (int SnappingClient) |
bool | IsSnappingCharacterInView (int SnappingClientId) |
bool | IsGrounded () |
void | SetWeapon (int W) |
void | SetJetpack (bool Active) |
void | SetEndlessJump (bool Active) |
void | SetJumps (int Jumps) |
void | SetSolo (bool Solo) |
void | SetSuper (bool Super) |
void | SetInvincible (bool Invincible) |
void | SetLiveFrozen (bool Active) |
void | SetDeepFrozen (bool Active) |
void | HandleWeaponSwitch () |
void | DoWeaponSwitch () |
void | HandleWeapons () |
void | HandleNinja () |
void | HandleJetpack () |
void | OnPredictedInput (CNetObj_PlayerInput *pNewInput) |
void | OnDirectInput (CNetObj_PlayerInput *pNewInput) |
void | ReleaseHook () |
void | ResetHook () |
void | ResetInput () |
void | FireWeapon () |
void | Die (int Killer, int Weapon, bool SendKillMsg=true) |
bool | TakeDamage (vec2 Force, int Dmg, int From, int Weapon) |
bool | Spawn (class CPlayer *pPlayer, vec2 Pos) |
bool | Remove () |
bool | IncreaseHealth (int Amount) |
bool | IncreaseArmor (int Amount) |
void | GiveWeapon (int Weapon, bool Remove=false) |
void | GiveNinja () |
void | RemoveNinja () |
void | SetEndlessHook (bool Enable) |
void | SetEmote (int Emote, int Tick) |
void | Rescue () |
int | NeededFaketuning () const |
bool | IsAlive () const |
bool | IsPaused () const |
class CPlayer * | GetPlayer () |
CClientMask | TeamMask () |
void | SetPosition (const vec2 &Position) |
void | Move (vec2 RelPos) |
void | ResetVelocity () |
void | SetVelocity (vec2 NewVelocity) |
void | SetRawVelocity (vec2 NewVelocity) |
void | AddVelocity (vec2 Addition) |
void | ApplyMoveRestrictions () |
CGameTeams * | Teams () |
void | SetTeams (CGameTeams *pTeams) |
bool | TrySetRescue (int RescueMode) |
void | FillAntibot (CAntibotCharacterData *pData) |
void | Pause (bool Pause) |
bool | Freeze (int Seconds) |
bool | Freeze () |
bool | UnFreeze () |
void | GiveAllWeapons () |
void | ResetPickups () |
void | ResetJumps () |
int | Team () |
bool | CanCollide (int ClientId) |
bool | SameTeam (int ClientId) |
void | StopRecording () |
int | GetLastWeapon () const |
void | SetLastWeapon (int LastWeap) |
int | GetActiveWeapon () const |
void | SetActiveWeapon (int ActiveWeap) |
void | SetLastAction (int LastAction) |
int | GetArmor () const |
void | SetArmor (int Armor) |
CCharacterCore | GetCore () |
void | SetCore (CCharacterCore Core) |
const CCharacterCore * | Core () const |
bool | GetWeaponGot (int Type) |
void | SetWeaponGot (int Type, bool Value) |
int | GetWeaponAmmo (int Type) |
void | SetWeaponAmmo (int Type, int Value) |
void | SetNinjaActivationDir (vec2 ActivationDir) |
void | SetNinjaActivationTick (int ActivationTick) |
void | SetNinjaCurrentMoveTime (int CurrentMoveTime) |
int | GetLastAction () const |
bool | HasTelegunGun () const |
bool | HasTelegunGrenade () const |
bool | HasTelegunLaser () const |
bool | HammerHitDisabled () const |
bool | ShotgunHitDisabled () const |
bool | LaserHitDisabled () const |
bool | GrenadeHitDisabled () const |
bool | IsSuper () const |
CSaveTee & | GetLastRescueTeeRef (int Mode=RESCUEMODE_AUTO) |
CTuningParams * | GetTuning (int Zone) |
Public Member Functions inherited from CEntity | |
int | GetId () const |
CEntity (CGameWorld *pGameWorld, int Objtype, vec2 Pos=vec2(0, 0), int ProximityRadius=0) | |
virtual | ~CEntity () |
std::vector< SSwitchers > & | Switchers () |
CGameWorld * | GameWorld () |
CTuningParams * | Tuning () |
CTuningParams * | TuningList () |
CTuningParams * | GetTuning (int i) |
class CCollision * | Collision () |
CEntity * | TypeNext () |
CEntity * | TypePrev () |
const vec2 & | GetPos () const |
float | GetProximityRadius () const |
void | Destroy () |
virtual void | PreTick () |
virtual void | Tick () |
virtual void | TickDeferred () |
bool | GameLayerClipped (vec2 CheckPos) |
CEntity * | NextEntity () |
void | Keep () |
CEntity () | |
int | GetId () const |
CEntity (CGameWorld *pGameWorld, int Objtype, vec2 Pos=vec2(0, 0), int ProximityRadius=0) | |
virtual | ~CEntity () |
std::vector< SSwitchers > & | Switchers () |
CGameWorld * | GameWorld () |
CTuningParams * | Tuning () |
CTuningParams * | TuningList () |
CTuningParams * | GetTuning (int i) |
class CConfig * | Config () |
class CGameContext * | GameServer () |
class IServer * | Server () |
CCollision * | Collision () |
CEntity * | TypeNext () |
CEntity * | TypePrev () |
const vec2 & | GetPos () const |
float | GetProximityRadius () const |
virtual void | Destroy () |
virtual void | Reset () |
virtual void | Tick () |
virtual void | TickDeferred () |
virtual void | TickPaused () |
virtual void | Snap (int SnappingClient) |
virtual void | PostSnap () |
virtual void | SwapClients (int Client1, int Client2) |
virtual ESaveResult | BlocksSave (int ClientId) |
virtual int | GetOwnerId () const |
bool | NetworkClipped (int SnappingClient) const |
bool | NetworkClipped (int SnappingClient, vec2 CheckPos) const |
bool | NetworkClippedLine (int SnappingClient, vec2 StartPos, vec2 EndPos) const |
bool | GameLayerClipped (vec2 CheckPos) |
bool | GetNearestAirPos (vec2 Pos, vec2 PrevPos, vec2 *pOutPos) |
bool | GetNearestAirPosPlayer (vec2 PlayerPos, vec2 *pOutPos) |
Public Attributes | |
bool | m_IsLocal |
bool | m_NinjaJetpack |
int | m_FreezeTime |
bool | m_FrozenLastTick |
int | m_TuneZone |
vec2 | m_PrevPos |
vec2 | m_PrevPrevPos |
int | m_TeleCheckpoint |
int | m_TileIndex |
int | m_TileFIndex |
bool | m_LastRefillJumps |
int | m_LastSnapWeapon |
int | m_LastJetpackStrength |
bool | m_KeepHooked |
int | m_GameTeam |
bool | m_CanMoveInFreeze |
int | m_DDRaceState |
int | m_TeamBeforeSuper |
bool | m_FreezeHammer |
int | m_TuneZoneOld |
int | m_PainSoundTimer |
int | m_LastMove |
int | m_StartTime |
int | m_TimeCpBroadcastEndTick |
int | m_LastTimeCp |
int | m_LastTimeCpBroadcasted |
float | m_aCurrentTimeCp [MAX_CHECKPOINTS] |
int64_t | m_LastStartWarning |
int64_t | m_LastRescue |
bool | m_LastPenalty |
bool | m_LastBonus |
vec2 | m_TeleGunPos |
bool | m_TeleGunTeleport |
bool | m_IsBlueTeleGunTeleport |
int | m_SpawnTick |
int | m_WeaponChangeTick |
Public Attributes inherited from CEntity | |
float | m_ProximityRadius |
vec2 | m_Pos |
int | m_Number |
int | m_Layer |
int | m_SnapTicks |
int | m_DestroyTick |
int | m_LastRenderTick |
CEntity * | m_pParent |
CEntity * | m_pChild |
Private Member Functions | |
void | HandleTiles (int Index) |
void | HandleSkippableTiles (int Index) |
void | DDRaceTick () |
void | DDRacePostCoreTick () |
void | HandleTuneLayer () |
CTuningParams * | CharacterTuning () |
void | SnapCharacter (int SnappingClient, int Id) |
void | SetTimeCheckpoint (int TimeCheckpoint) |
void | HandleTiles (int Index) |
void | DDRaceInit () |
void | HandleSkippableTiles (int Index) |
void | ForceSetRescue (int RescueMode) |
void | DDRaceTick () |
void | DDRacePostCoreTick () |
void | HandleBroadcast () |
void | HandleTuneLayer () |
void | SendZoneMsgs () |
IAntibot * | Antibot () |
Static Private Member Functions | |
static bool | IsSwitchActiveCb (int Number, void *pUser) |
static bool | IsSwitchActiveCb (int Number, void *pUser) |
Private Attributes | |
int | m_aHitObjects [10] |
int | m_NumObjectsHit |
int | m_LastWeapon |
int | m_QueuedWeapon |
int | m_ReloadTimer |
int | m_AttackTick |
int | m_MoveRestrictions |
CNetObj_PlayerInput | m_LatestPrevInput |
CNetObj_PlayerInput | m_LatestInput |
CNetObj_PlayerInput | m_PrevInput |
CNetObj_PlayerInput | m_Input |
CNetObj_PlayerInput | m_SavedInput |
int | m_NumInputs |
CCharacterCore | m_Core |
int | m_StrongWeakId |
int | m_LastWeaponSwitchTick |
int | m_LastTuneZoneTick |
class CPlayer * | m_pPlayer |
bool | m_Alive |
bool | m_Paused |
int | m_PausedTick |
int | m_NeededFaketuning |
CEntity * | m_apHitObjects [10] |
int | m_DamageTaken |
int | m_EmoteType |
int | m_EmoteStop |
int | m_LastAction |
int | m_LastNoAmmoSound |
CNetObj_PlayerInput | m_LatestPrevPrevInput |
int | m_DamageTakenTick |
int | m_Health |
int | m_Armor |
int | m_TriggeredEvents7 |
CGameTeams * | m_pTeams = nullptr |
int | m_ReckoningTick |
CCharacterCore | m_SendCore |
CCharacterCore | m_ReckoningCore |
float | m_Time |
int | m_LastBroadcast |
bool | m_SetSavePos [NUM_RESCUEMODES] |
CSaveTee | m_RescueTee [NUM_RESCUEMODES] |
Friends | |
class | CGameWorld |
class | CSaveTee |
Additional Inherited Members | |
Protected Attributes inherited from CEntity | |
CGameWorld * | m_pGameWorld |
bool | m_MarkedForDestroy |
int | m_Id |
int | m_ObjType |
CCharacter::~CCharacter | ( | ) |
CCharacter::CCharacter | ( | CGameWorld * | pGameWorld, |
int | Id, | ||
CNetObj_Character * | pChar, | ||
CNetObj_DDNetCharacter * | pExtended = 0 |
||
) |
CCharacter::CCharacter | ( | CGameWorld * | pWorld, |
CNetObj_PlayerInput | LastInput | ||
) |
void CCharacter::AddVelocity | ( | vec2 | Addition | ) |
void CCharacter::AddVelocity | ( | vec2 | Addition | ) |
|
private |
void CCharacter::ApplyMoveRestrictions | ( | ) |
void CCharacter::ApplyMoveRestrictions | ( | ) |
bool CCharacter::CanCollide | ( | int | ClientId | ) |
bool CCharacter::CanCollide | ( | int | ClientId | ) |
bool CCharacter::CanSnapCharacter | ( | int | SnappingClient | ) |
|
private |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Reimplemented from CEntity.
void CCharacter::Die | ( | int | Killer, |
int | Weapon, | ||
bool | SendKillMsg = true |
||
) |
void CCharacter::DoWeaponSwitch | ( | ) |
void CCharacter::DoWeaponSwitch | ( | ) |
void CCharacter::FillAntibot | ( | CAntibotCharacterData * | pData | ) |
void CCharacter::FireWeapon | ( | ) |
void CCharacter::FireWeapon | ( | ) |
|
private |
bool CCharacter::Freeze | ( | ) |
bool CCharacter::Freeze | ( | ) |
bool CCharacter::Freeze | ( | int | Seconds | ) |
bool CCharacter::Freeze | ( | int | Seconds | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void CCharacter::GiveAllWeapons | ( | ) |
void CCharacter::GiveAllWeapons | ( | ) |
void CCharacter::GiveNinja | ( | ) |
void CCharacter::GiveNinja | ( | ) |
void CCharacter::GiveWeapon | ( | int | Weapon, |
bool | Remove = false |
||
) |
void CCharacter::GiveWeapon | ( | int | Weapon, |
bool | Remove = false |
||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
void CCharacter::HandleJetpack | ( | ) |
void CCharacter::HandleJetpack | ( | ) |
void CCharacter::HandleNinja | ( | ) |
void CCharacter::HandleNinja | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
void CCharacter::HandleWeapons | ( | ) |
void CCharacter::HandleWeapons | ( | ) |
void CCharacter::HandleWeaponSwitch | ( | ) |
void CCharacter::HandleWeaponSwitch | ( | ) |
|
inline |
|
inline |
|
inline |
bool CCharacter::IncreaseArmor | ( | int | Amount | ) |
bool CCharacter::IncreaseHealth | ( | int | Amount | ) |
|
inline |
bool CCharacter::IsGrounded | ( | ) |
bool CCharacter::IsGrounded | ( | ) |
|
inline |
bool CCharacter::IsSnappingCharacterInView | ( | int | SnappingClientId | ) |
|
inline |
|
inline |
|
staticprivate |
|
staticprivate |
|
inline |
|
inline |
bool CCharacter::Match | ( | CCharacter * | pChar | ) | const |
void CCharacter::Move | ( | vec2 | RelPos | ) |
|
inline |
void CCharacter::OnDirectInput | ( | CNetObj_PlayerInput * | pNewInput | ) |
void CCharacter::OnDirectInput | ( | CNetObj_PlayerInput * | pNewInput | ) |
void CCharacter::OnPredictedInput | ( | CNetObj_PlayerInput * | pNewInput | ) |
void CCharacter::OnPredictedInput | ( | CNetObj_PlayerInput * | pNewInput | ) |
void CCharacter::Pause | ( | bool | Pause | ) |
|
overridevirtual |
Reimplemented from CEntity.
|
virtual |
Reimplemented from CEntity.
|
overridevirtual |
Reimplemented from CEntity.
void CCharacter::Read | ( | CNetObj_Character * | pChar, |
CNetObj_DDNetCharacter * | pExtended, | ||
bool | IsLocal | ||
) |
void CCharacter::ReleaseHook | ( | ) |
void CCharacter::ReleaseHook | ( | ) |
bool CCharacter::Remove | ( | ) |
void CCharacter::RemoveNinja | ( | ) |
void CCharacter::RemoveNinja | ( | ) |
void CCharacter::Rescue | ( | ) |
|
overridevirtual |
Reimplemented from CEntity.
void CCharacter::ResetHook | ( | ) |
void CCharacter::ResetHook | ( | ) |
void CCharacter::ResetInput | ( | ) |
void CCharacter::ResetInput | ( | ) |
void CCharacter::ResetJumps | ( | ) |
void CCharacter::ResetPickups | ( | ) |
void CCharacter::ResetPrediction | ( | ) |
void CCharacter::ResetVelocity | ( | ) |
void CCharacter::ResetVelocity | ( | ) |
bool CCharacter::SameTeam | ( | int | ClientId | ) |
bool CCharacter::SameTeam | ( | int | ClientId | ) |
|
private |
void CCharacter::SetActiveWeapon | ( | int | ActiveWeap | ) |
|
inline |
|
inline |
|
inline |
|
inline |
void CCharacter::SetCoreWorld | ( | CGameWorld * | pGameWorld | ) |
void CCharacter::SetDeepFrozen | ( | bool | Active | ) |
void CCharacter::SetEmote | ( | int | Emote, |
int | Tick | ||
) |
void CCharacter::SetEndlessHook | ( | bool | Enable | ) |
void CCharacter::SetEndlessJump | ( | bool | Active | ) |
|
inline |
void CCharacter::SetInvincible | ( | bool | Invincible | ) |
void CCharacter::SetJetpack | ( | bool | Active | ) |
void CCharacter::SetJumps | ( | int | Jumps | ) |
|
inline |
|
inline |
|
inline |
void CCharacter::SetLiveFrozen | ( | bool | Active | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void CCharacter::SetPosition | ( | const vec2 & | Position | ) |
void CCharacter::SetRawVelocity | ( | vec2 | NewVelocity | ) |
void CCharacter::SetRawVelocity | ( | vec2 | NewVelocity | ) |
void CCharacter::SetSolo | ( | bool | Solo | ) |
void CCharacter::SetSolo | ( | bool | Solo | ) |
void CCharacter::SetSuper | ( | bool | Super | ) |
void CCharacter::SetSuper | ( | bool | Super | ) |
void CCharacter::SetTeams | ( | CGameTeams * | pTeams | ) |
|
private |
void CCharacter::SetTuneZone | ( | int | Zone | ) |
void CCharacter::SetVelocity | ( | vec2 | NewVelocity | ) |
void CCharacter::SetVelocity | ( | vec2 | NewVelocity | ) |
void CCharacter::SetWeapon | ( | int | W | ) |
void CCharacter::SetWeapon | ( | int | W | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from CEntity.
|
private |
void CCharacter::StopRecording | ( | ) |
|
overridevirtual |
Reimplemented from CEntity.
bool CCharacter::TakeDamage | ( | vec2 | Force, |
int | Dmg, | ||
int | From, | ||
int | Weapon | ||
) |
bool CCharacter::TakeDamage | ( | vec2 | Force, |
int | Dmg, | ||
int | From, | ||
int | Weapon | ||
) |
int CCharacter::Team | ( | ) |
int CCharacter::Team | ( | ) |
CClientMask CCharacter::TeamMask | ( | ) |
|
inline |
CTeamsCore * CCharacter::TeamsCore | ( | ) |
|
overridevirtual |
Reimplemented from CEntity.
|
overridevirtual |
Reimplemented from CEntity.
|
overridevirtual |
Reimplemented from CEntity.
|
overridevirtual |
Reimplemented from CEntity.
|
overridevirtual |
Reimplemented from CEntity.
bool CCharacter::TrySetRescue | ( | int | RescueMode | ) |
bool CCharacter::UnFreeze | ( | ) |
bool CCharacter::UnFreeze | ( | ) |
|
friend |
|
friend |
float CCharacter::m_aCurrentTimeCp[MAX_CHECKPOINTS] |
|
private |
|
private |
|
private |
|
private |
|
private |
bool CCharacter::m_CanMoveInFreeze |
|
private |
|
private |
|
private |
int CCharacter::m_DDRaceState |
|
private |
|
private |
bool CCharacter::m_FreezeHammer |
int CCharacter::m_FreezeTime |
bool CCharacter::m_FrozenLastTick |
int CCharacter::m_GameTeam |
|
private |
|
private |
bool CCharacter::m_IsBlueTeleGunTeleport |
bool CCharacter::m_IsLocal |
bool CCharacter::m_KeepHooked |
|
private |
bool CCharacter::m_LastBonus |
|
private |
int CCharacter::m_LastJetpackStrength |
int CCharacter::m_LastMove |
|
private |
bool CCharacter::m_LastPenalty |
bool CCharacter::m_LastRefillJumps |
int64_t CCharacter::m_LastRescue |
int CCharacter::m_LastSnapWeapon |
int64_t CCharacter::m_LastStartWarning |
int CCharacter::m_LastTimeCp |
int CCharacter::m_LastTimeCpBroadcasted |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
bool CCharacter::m_NinjaJetpack |
|
private |
|
private |
int CCharacter::m_PainSoundTimer |
|
private |
|
private |
|
private |
|
private |
vec2 CCharacter::m_PrevPos |
vec2 CCharacter::m_PrevPrevPos |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
int CCharacter::m_SpawnTick |
int CCharacter::m_StartTime |
|
private |
int CCharacter::m_TeamBeforeSuper |
int CCharacter::m_TeleCheckpoint |
vec2 CCharacter::m_TeleGunPos |
bool CCharacter::m_TeleGunTeleport |
int CCharacter::m_TileFIndex |
int CCharacter::m_TileIndex |
|
private |
int CCharacter::m_TimeCpBroadcastEndTick |
|
private |
int CCharacter::m_TuneZone |
int CCharacter::m_TuneZoneOld |
int CCharacter::m_WeaponChangeTick |