diff --git a/src/game/server/neo/neo_player.cpp b/src/game/server/neo/neo_player.cpp index f29ea89f3..fe544199c 100644 --- a/src/game/server/neo/neo_player.cpp +++ b/src/game/server/neo/neo_player.cpp @@ -46,13 +46,13 @@ LINK_ENTITY_TO_CLASS(player, CNEO_Player); IMPLEMENT_SERVERCLASS_ST(CNEO_Player, DT_NEO_Player) SendPropInt(SENDINFO(m_iNeoClass)), -SendPropInt(SENDINFO(m_iNeoSkin)), -SendPropInt(SENDINFO(m_iNeoStar)), +SendPropInt(SENDINFO(m_iNeoSkin), NumBitsForCount(NEO_SKIN_ENUM_COUNT), SPROP_UNSIGNED), +SendPropInt(SENDINFO(m_iNeoStar), NumBitsForCount(STAR__TOTAL), SPROP_UNSIGNED), SendPropInt(SENDINFO(m_iClassBeforeTakeover)), SendPropInt(SENDINFO(m_iXP)), -SendPropInt(SENDINFO(m_iLoadoutWepChoice)), +SendPropInt(SENDINFO(m_iLoadoutWepChoice), NumBitsForCount(MAX_WEAPON_LOADOUTS), SPROP_UNSIGNED), SendPropInt(SENDINFO(m_iNextSpawnClassChoice)), -SendPropInt(SENDINFO(m_bInLean)), +SendPropInt(SENDINFO(m_bInLean), NumBitsForCount(NEO_LEAN_ENUM_COUNT), SPROP_UNSIGNED), SendPropEHandle(SENDINFO(m_hServerRagdoll)), SendPropBool(SENDINFO(m_bInThermOpticCamo)), @@ -65,7 +65,7 @@ SendPropBool(SENDINFO(m_bIneligibleForLoadoutPick)), SendPropBool(SENDINFO(m_bCarryingGhost)), SendPropTime(SENDINFO(m_flCamoAuxLastTime)), -SendPropInt(SENDINFO(m_nVisionLastTick)), +SendPropInt(SENDINFO(m_nVisionLastTick), -1, SPROP_UNSIGNED), SendPropTime(SENDINFO(m_flJumpLastTime)), SendPropTime(SENDINFO(m_flNextPingTime)), diff --git a/src/game/shared/neo/neo_gamerules.cpp b/src/game/shared/neo/neo_gamerules.cpp index 99c09c6b7..d9c799b07 100644 --- a/src/game/shared/neo/neo_gamerules.cpp +++ b/src/game/shared/neo/neo_gamerules.cpp @@ -223,9 +223,9 @@ REGISTER_GAMERULES_CLASS( CNEORules ); BEGIN_NETWORK_TABLE_NOBASE( CNEORules, DT_NEORules ) // NEO TODO (Rain): NEO specific game modes var (CTG/TDM/...) #ifdef CLIENT_DLL - RecvPropFloat(RECVINFO(m_flNeoNextRoundStartTime)), - RecvPropFloat(RECVINFO(m_flNeoRoundStartTime)), - RecvPropFloat(RECVINFO(m_flPauseEnd)), + RecvPropTime(RECVINFO(m_flNeoNextRoundStartTime)), + RecvPropTime(RECVINFO(m_flNeoRoundStartTime)), + RecvPropTime(RECVINFO(m_flPauseEnd)), RecvPropInt(RECVINFO(m_nRoundStatus)), RecvPropInt(RECVINFO(m_nGameTypeSelected)), RecvPropInt(RECVINFO(m_iRoundNumber)), @@ -241,18 +241,18 @@ BEGIN_NETWORK_TABLE_NOBASE( CNEORules, DT_NEORules ) RecvPropInt(RECVINFO(m_iGhosterPlayer)), RecvPropInt(RECVINFO(m_iEscortingTeam)), RecvPropBool(RECVINFO(m_bGhostExists)), - RecvPropFloat(RECVINFO(m_flGhostLastHeld)), + RecvPropTime(RECVINFO(m_flGhostLastHeld)), RecvPropVector(RECVINFO(m_vecGhostMarkerPos)), RecvPropEHandle(RECVINFO(m_hGhost)), RecvPropInt(RECVINFO(m_iJuggernautPlayerIndex)), RecvPropBool(RECVINFO(m_bJuggernautItemExists)), RecvPropEHandle(RECVINFO(m_hJuggernaut)), #else - SendPropFloat(SENDINFO(m_flNeoNextRoundStartTime)), - SendPropFloat(SENDINFO(m_flNeoRoundStartTime)), - SendPropFloat(SENDINFO(m_flPauseEnd)), - SendPropInt(SENDINFO(m_nRoundStatus)), - SendPropInt(SENDINFO(m_nGameTypeSelected)), + SendPropTime(SENDINFO(m_flNeoNextRoundStartTime)), + SendPropTime(SENDINFO(m_flNeoRoundStartTime)), + SendPropTime(SENDINFO(m_flPauseEnd)), + SendPropInt(SENDINFO(m_nRoundStatus), NumBitsForCount(RoundStatusTotal), SPROP_UNSIGNED), + SendPropInt(SENDINFO(m_nGameTypeSelected), NumBitsForCount(NEO_GAME_TYPE__TOTAL), SPROP_UNSIGNED), SendPropInt(SENDINFO(m_iRoundNumber)), SendPropInt(SENDINFO(m_iHiddenHudElements)), SendPropInt(SENDINFO(m_iForcedTeam)), @@ -262,14 +262,14 @@ BEGIN_NETWORK_TABLE_NOBASE( CNEORules, DT_NEORules ) SendPropBool(SENDINFO(m_bCyberspaceLevel)), SendPropString(SENDINFO(m_szNeoJinraiClantag)), SendPropString(SENDINFO(m_szNeoNSFClantag)), - SendPropInt(SENDINFO(m_iGhosterTeam)), - SendPropInt(SENDINFO(m_iGhosterPlayer)), + SendPropInt(SENDINFO(m_iGhosterTeam), NumBitsForCount(TEAM__TOTAL), SPROP_UNSIGNED), + SendPropInt(SENDINFO(m_iGhosterPlayer), NumBitsForCount(MAX_PLAYERS_ARRAY_SAFE), SPROP_UNSIGNED), SendPropInt(SENDINFO(m_iEscortingTeam)), SendPropBool(SENDINFO(m_bGhostExists)), - SendPropFloat(SENDINFO(m_flGhostLastHeld)), + SendPropTime(SENDINFO(m_flGhostLastHeld)), SendPropVector(SENDINFO(m_vecGhostMarkerPos), -1, SPROP_COORD_MP_LOWPRECISION | SPROP_CHANGES_OFTEN, MIN_COORD_FLOAT, MAX_COORD_FLOAT), SendPropEHandle(SENDINFO(m_hGhost)), - SendPropInt(SENDINFO(m_iJuggernautPlayerIndex)), + SendPropInt(SENDINFO(m_iJuggernautPlayerIndex), NumBitsForCount(MAX_PLAYERS_ARRAY_SAFE), SPROP_UNSIGNED), SendPropBool(SENDINFO(m_bJuggernautItemExists)), SendPropEHandle(SENDINFO(m_hJuggernaut)), #endif diff --git a/src/game/shared/neo/neo_gamerules.h b/src/game/shared/neo/neo_gamerules.h index 988c60abc..3f5858c5a 100644 --- a/src/game/shared/neo/neo_gamerules.h +++ b/src/game/shared/neo/neo_gamerules.h @@ -116,6 +116,8 @@ enum NeoRoundStatus { PostRound, Pause, Countdown, + + RoundStatusTotal }; enum NeoWinReason { diff --git a/src/game/shared/neo/neo_ghost_cap_point.cpp b/src/game/shared/neo/neo_ghost_cap_point.cpp index 1e246a2c7..5bbb7a5e5 100644 --- a/src/game/shared/neo/neo_ghost_cap_point.cpp +++ b/src/game/shared/neo/neo_ghost_cap_point.cpp @@ -40,8 +40,8 @@ LINK_ENTITY_TO_CLASS(neo_ghost_retrieval_point, CNEOGhostCapturePoint); IMPLEMENT_SERVERCLASS_ST(CNEOGhostCapturePoint, DT_NEOGhostCapturePoint) SendPropFloat(SENDINFO(m_flCapzoneRadius)), - SendPropInt(SENDINFO(m_iOwningTeam)), - SendPropInt(SENDINFO(m_iSuccessfulCaptorClientIndex)), + SendPropInt(SENDINFO(m_iOwningTeam), NumBitsForCount(TEAM__TOTAL), SPROP_UNSIGNED), + SendPropInt(SENDINFO(m_iSuccessfulCaptorClientIndex), NumBitsForCount(MAX_PLAYERS_ARRAY_SAFE), SPROP_UNSIGNED), SendPropBool(SENDINFO(m_bGhostHasBeenCaptured)), SendPropBool(SENDINFO(m_bIsActive)), diff --git a/src/game/shared/neo/neo_player_shared.h b/src/game/shared/neo/neo_player_shared.h index cbbc1d5e9..ea4eb3617 100644 --- a/src/game/shared/neo/neo_player_shared.h +++ b/src/game/shared/neo/neo_player_shared.h @@ -244,7 +244,10 @@ enum NeoLeanDirectionE { NEO_LEAN_NONE = 0, NEO_LEAN_LEFT, NEO_LEAN_RIGHT, + + NEO_LEAN__ENUM_COUNT }; +static constexpr int NEO_LEAN_ENUM_COUNT = NEO_LEAN__ENUM_COUNT; enum NeoWeponAimToggleE { NEO_TOGGLE_NIL = 0,