Browse Source

Merge branch 'opfor' into opforfixed

opforfixed
Andrey Akhmichin 2 years ago
parent
commit
3b6aeb7e2b
No known key found for this signature in database
GPG Key ID: 1F180D249B0643C0
  1. 7
      dlls/subs.cpp

7
dlls/subs.cpp

@ -407,13 +407,6 @@ void CBaseToggle::LinearMove( Vector vecDest, float flSpeed )
// divide vector length by speed to get time to reach dest // divide vector length by speed to get time to reach dest
float flTravelTime = vecDestDelta.Length() / flSpeed; float flTravelTime = vecDestDelta.Length() / flSpeed;
if( flTravelTime < 0.05f )
{
UTIL_SetOrigin( pev, m_vecFinalDest );
LinearMoveDone();
return;
}
// set nextthink to trigger a call to LinearMoveDone when dest is reached // set nextthink to trigger a call to LinearMoveDone when dest is reached
pev->nextthink = pev->ltime + flTravelTime; pev->nextthink = pev->ltime + flTravelTime;
SetThink( &CBaseToggle::LinearMoveDone ); SetThink( &CBaseToggle::LinearMoveDone );

Loading…
Cancel
Save