File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -745,12 +745,12 @@ void PlayerMixin::SetSuitPowerLoad(float value)
745745
746746unsigned char PlayerMixin::GetDesiredPlayerClass ()
747747{
748- static int offset = FindNetworkPropertyOffset (" m_Shared.m_iDesiredPlayerClass " );
748+ static int offset = FindNetworkPropertyOffset (DESIRED_PLAYER_CLASS_PROPERTY );
749749 return GetNetworkPropertyByOffset<unsigned char >(offset);
750750}
751751
752752void PlayerMixin::SetDesiredPlayerClass (unsigned char value)
753753{
754- static int offset = FindNetworkPropertyOffset (" m_Shared.m_iDesiredPlayerClass " );
754+ static int offset = FindNetworkPropertyOffset (DESIRED_PLAYER_CLASS_PROPERTY );
755755 SetNetworkPropertyByOffset<unsigned char >(offset, value);
756756}
Original file line number Diff line number Diff line change @@ -53,10 +53,19 @@ using namespace boost::python;
5353// Player class property
5454#if defined(ENGINE_BRANCH_TF2)
5555 #define PLAYER_CLASS_PROPERTY " m_PlayerClass.m_iClass"
56+ #elif defined(ENGINE_BRANCH_DODS)
57+ #define PLAYER_CLASS_PROPERTY " m_Shared.dodsharedlocaldata.m_iPlayerClass"
5658#else
5759 #define PLAYER_CLASS_PROPERTY " m_iClass"
5860#endif
5961
62+ // Desired Player class property
63+ #if defined(ENGINE_BRANCH_DODS)
64+ #define DESIRED_PLAYER_CLASS_PROPERTY " m_Shared.dodsharedlocaldata.m_iDesiredPlayerClass"
65+ #else
66+ #define DESIRED_PLAYER_CLASS_PROPERTY " m_Shared.m_iDesiredPlayerClass"
67+ #endif
68+
6069
6170// -----------------------------------------------------------------------------
6271// CBaseEntity extension class for players.
You can’t perform that action at this time.
0 commit comments