diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index 840752bf..f21050bb 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -49,7 +49,6 @@ #include #include "smn_keyvalues.h" #include "command_args.h" -#include #include #include #include @@ -1936,25 +1935,8 @@ bool PlayerManager::HandleConVarQuery(QueryCvarCookie_t cookie, int client, EQue CPlayer::CPlayer() { - m_IsConnected = false; - m_IsInGame = false; - m_IsAuthorized = false; - m_pEdict = NULL; - m_Admin = INVALID_ADMIN_ID; - m_TempAdmin = false; - m_Info = NULL; - m_bAdminCheckSignalled = false; - m_UserId = -1; - m_bIsInKickQueue = false; m_LastPassword.clear(); - m_LangId = SOURCEMOD_LANGUAGE_ENGLISH; - m_bFakeClient = false; - m_bIsSourceTV = false; - m_bIsReplay = false; m_Serial.value = -1; -#if SOURCE_ENGINE == SE_CSGO - m_LanguageCookie = InvalidQueryCvarCookie; -#endif } void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity) diff --git a/core/PlayerManager.h b/core/PlayerManager.h index 5e88f066..d5bb32a4 100644 --- a/core/PlayerManager.h +++ b/core/PlayerManager.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -123,32 +124,32 @@ private: bool SetEngineString(); bool SetCSteamID(); private: - bool m_IsConnected; - bool m_IsInGame; - bool m_IsAuthorized; - bool m_bIsInKickQueue; + bool m_IsConnected = false; + bool m_IsInGame = false; + bool m_IsAuthorized = false; + bool m_bIsInKickQueue = false; String m_Name; String m_Ip; String m_IpNoPort; ke::AString m_AuthID; ke::AString m_Steam2Id; ke::AString m_Steam3Id; - AdminId m_Admin; - bool m_TempAdmin; - edict_t *m_pEdict; - IPlayerInfo *m_Info; + AdminId m_Admin = INVALID_ADMIN_ID; + bool m_TempAdmin = false; + edict_t *m_pEdict = nullptr; + IPlayerInfo *m_Info = nullptr; String m_LastPassword; - bool m_bAdminCheckSignalled; + bool m_bAdminCheckSignalled = false; int m_iIndex; - unsigned int m_LangId; - int m_UserId; - bool m_bFakeClient; - bool m_bIsSourceTV; - bool m_bIsReplay; + unsigned int m_LangId = SOURCEMOD_LANGUAGE_ENGLISH; + int m_UserId = -1; + bool m_bFakeClient = false; + bool m_bIsSourceTV = false; + bool m_bIsReplay = false; serial_t m_Serial; CSteamID m_SteamId; #if SOURCE_ENGINE == SE_CSGO - QueryCvarCookie_t m_LanguageCookie; + QueryCvarCookie_t m_LanguageCookie = InvalidQueryCvarCookie; #endif };