Skip to content

Commit

Permalink
Changed GetEffects/SetEffects to DatamapProperty. (#441)
Browse files Browse the repository at this point in the history
* Fixed FindNetworkPropertyOffset to return an offset.

* Changed GetEffects/SetEffects to DatamapProperty.

* Corrected a mistake.
  • Loading branch information
CookStar committed Nov 23, 2021
1 parent f2ed4c2 commit af069f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/modules/entities/entities_entity.cpp
Expand Up @@ -778,13 +778,13 @@ void CBaseEntityWrapper::SetDamageFilter(const char* filter)

int CBaseEntityWrapper::GetEffects()
{
static int offset = FindNetworkPropertyOffset("m_fEffects");
static int offset = FindDatamapPropertyOffset("m_fEffects");
return GetNetworkPropertyByOffset<int>(offset);
}

void CBaseEntityWrapper::SetEffects(int effects)
{
static int offset = FindNetworkPropertyOffset("m_fEffects");
static int offset = FindDatamapPropertyOffset("m_fEffects");
SetNetworkPropertyByOffset<int>(offset, effects);
}

Expand Down

0 comments on commit af069f2

Please sign in to comment.