Skip to content

Commit

Permalink
Enclose IsInWorld changes with FIXES macro
Browse files Browse the repository at this point in the history
  • Loading branch information
dystopm committed Oct 30, 2023
1 parent b0acc61 commit ec82ccb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions regamedll/dlls/cbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,13 +865,9 @@ BOOL CBaseEntity::IsInWorld()
return FALSE;
}

// speed
#ifdef REGAMEDLL_FIXES
double maxvel = g_psv_maxvelocity->value;
#else
double maxvel = 2000.0;
#endif

// speed
if (pev->velocity.x > maxvel || pev->velocity.y > maxvel || pev->velocity.z > maxvel)
{
return FALSE;
Expand All @@ -880,6 +876,16 @@ BOOL CBaseEntity::IsInWorld()
{
return FALSE;
}
#else
if (pev->velocity.x >= 2000.0 || pev->velocity.y >= 2000.0 || pev->velocity.z >= 2000.0)
{
return FALSE;
}
if (pev->velocity.x <= -2000.0 || pev->velocity.y <= -2000.0 || pev->velocity.z <= -2000.0)
{
return FALSE;
}
#endif

return TRUE;
}
Expand Down

0 comments on commit ec82ccb

Please sign in to comment.