Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addons/source-python/data/source-python/entities/orangebox/dod/CDODPlayer.ini
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[property]

ragdoll = m_hRagdoll
desired_player_class = m_Shared.dodsharedlocaldata.m_iDesiredPlayerClass

[[eye_angle]]
name = m_angEyeAngles[0]
Expand Down
4 changes: 2 additions & 2 deletions src/core/modules/players/players_entity.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -745,12 +745,12 @@ void PlayerMixin::SetSuitPowerLoad(float value)

unsigned char PlayerMixin::GetDesiredPlayerClass()
{
static int offset = FindNetworkPropertyOffset("m_Shared.m_iDesiredPlayerClass");
static int offset = FindNetworkPropertyOffset(DESIRED_PLAYER_CLASS_PROPERTY);
return GetNetworkPropertyByOffset<unsigned char>(offset);
}

void PlayerMixin::SetDesiredPlayerClass(unsigned char value)
{
static int offset = FindNetworkPropertyOffset("m_Shared.m_iDesiredPlayerClass");
static int offset = FindNetworkPropertyOffset(DESIRED_PLAYER_CLASS_PROPERTY);
SetNetworkPropertyByOffset<unsigned char>(offset, value);
}
7 changes: 7 additions & 0 deletions src/core/modules/players/players_entity.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ using namespace boost::python;
#define PLAYER_CLASS_PROPERTY "m_iClass"
#endif

// Desired Player class property
#if defined(ENGINE_BRANCH_DODS)
#define DESIRED_PLAYER_CLASS_PROPERTY "m_Shared.dodsharedlocaldata.m_iDesiredPlayerClass"
#else
#define DESIRED_PLAYER_CLASS_PROPERTY "m_Shared.m_iDesiredPlayerClass"
#endif


//-----------------------------------------------------------------------------
// CBaseEntity extension class for players.
Expand Down