Merge pull request #8409 from ChillerDragon/pr_const_char

Mark some character methods const
This commit is contained in:
heinrich5991 2024-05-29 00:31:19 +00:00 committed by GitHub
commit a5ca7c64e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,7 +84,7 @@ public:
void Rescue();
int NeededFaketuning() { return m_NeededFaketuning; }
int NeededFaketuning() const { return m_NeededFaketuning; }
bool IsAlive() const { return m_Alive; }
bool IsPaused() const { return m_Paused; }
class CPlayer *GetPlayer() { return m_pPlayer; }
@ -229,12 +229,12 @@ public:
int m_WeaponChangeTick;
// Setters/Getters because i don't want to modify vanilla vars access modifiers
int GetLastWeapon() { return m_LastWeapon; }
int GetLastWeapon() const { return m_LastWeapon; }
void SetLastWeapon(int LastWeap) { m_LastWeapon = LastWeap; }
int GetActiveWeapon() { return m_Core.m_ActiveWeapon; }
int GetActiveWeapon() const { return m_Core.m_ActiveWeapon; }
void SetActiveWeapon(int ActiveWeap) { m_Core.m_ActiveWeapon = ActiveWeap; }
void SetLastAction(int LastAction) { m_LastAction = LastAction; }
int GetArmor() { return m_Armor; }
int GetArmor() const { return m_Armor; }
void SetArmor(int Armor) { m_Armor = Armor; }
CCharacterCore GetCore() { return m_Core; }
void SetCore(CCharacterCore Core) { m_Core = Core; }
@ -249,16 +249,16 @@ public:
int GetLastAction() const { return m_LastAction; }
bool HasTelegunGun() { return m_Core.m_HasTelegunGun; }
bool HasTelegunGrenade() { return m_Core.m_HasTelegunGrenade; }
bool HasTelegunLaser() { return m_Core.m_HasTelegunLaser; }
bool HasTelegunGun() const { return m_Core.m_HasTelegunGun; }
bool HasTelegunGrenade() const { return m_Core.m_HasTelegunGrenade; }
bool HasTelegunLaser() const { return m_Core.m_HasTelegunLaser; }
bool HammerHitDisabled() { return m_Core.m_HammerHitDisabled; }
bool ShotgunHitDisabled() { return m_Core.m_ShotgunHitDisabled; }
bool LaserHitDisabled() { return m_Core.m_LaserHitDisabled; }
bool GrenadeHitDisabled() { return m_Core.m_GrenadeHitDisabled; }
bool HammerHitDisabled() const { return m_Core.m_HammerHitDisabled; }
bool ShotgunHitDisabled() const { return m_Core.m_ShotgunHitDisabled; }
bool LaserHitDisabled() const { return m_Core.m_LaserHitDisabled; }
bool GrenadeHitDisabled() const { return m_Core.m_GrenadeHitDisabled; }
bool IsSuper() { return m_Core.m_Super; }
bool IsSuper() const { return m_Core.m_Super; }
CSaveTee &GetLastRescueTeeRef(int Mode = RESCUEMODE_AUTO) { return m_RescueTee[Mode]; }
};