File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -468,16 +468,26 @@ void PlayerMixin::SetShotsFired(unsigned char value)
468468}
469469
470470
471- short PlayerMixin::GetArmor ()
471+ int PlayerMixin::GetArmor ()
472472{
473+ #if defined(ENGINE_BRANCH_HL2DM)
474+ static int offset = FindDatamapPropertyOffset (" m_ArmorValue" );
475+ return GetDatamapPropertyByOffset<int >(offset);
476+ #else
473477 static int offset = FindNetworkPropertyOffset (" m_ArmorValue" );
474478 return GetNetworkPropertyByOffset<char >(offset);
479+ #endif
475480}
476481
477- void PlayerMixin::SetArmor (short value)
482+ void PlayerMixin::SetArmor (int value)
478483{
484+ #if defined(ENGINE_BRANCH_HL2DM)
485+ static int offset = FindDatamapPropertyOffset (" m_ArmorValue" );
486+ SetDatamapPropertyByOffset<int >(offset, value);
487+ #else
479488 static int offset = FindNetworkPropertyOffset (" m_ArmorValue" );
480489 SetNetworkPropertyByOffset<char >(offset, value);
490+ #endif
481491}
482492
483493
Original file line number Diff line number Diff line change @@ -168,9 +168,8 @@ class PlayerMixin: public CBaseEntityWrapper
168168 unsigned char GetShotsFired ();
169169 void SetShotsFired (unsigned char value);
170170
171- // It's char actually, but Boost.Python converts a char to a Python string
172- short GetArmor ();
173- void SetArmor (short value);
171+ int GetArmor ();
172+ void SetArmor (int value);
174173
175174 bool GetHasDefuser ();
176175 void SetHasDefuser (bool value);
You can’t perform that action at this time.
0 commit comments