runplayermove is now not called every frame, the same as main bot code
this gives another fps boost for server perfomance, but gives a little shaky viewmodel (gun) drawing for bot while spectating him in firstperson mode.
This commit is contained in:
parent
6502c44050
commit
11d3ffe20e
4 changed files with 11 additions and 5 deletions
|
|
@ -3164,8 +3164,11 @@ void Bot::UpdateBodyAngles (void)
|
|||
|
||||
void Bot::UpdateLookAngles (void)
|
||||
{
|
||||
const float delta = GetWorldTime () - m_lookUpdateTime;
|
||||
m_lookUpdateTime = GetWorldTime ();
|
||||
|
||||
// adjust all body and view angles to face an absolute vector
|
||||
Vector direction = (m_lookAt - EyePosition ()).ToAngles () + pev->punchangle * (m_difficulty * 25) / 100.0;
|
||||
Vector direction = (m_lookAt - EyePosition ()).ToAngles ();
|
||||
direction.x *= -1.0f; // invert for engine
|
||||
|
||||
direction.ClampAngles ();
|
||||
|
|
@ -3189,8 +3192,6 @@ void Bot::UpdateLookAngles (void)
|
|||
float angleDiffYaw = AngleNormalize (direction.y - m_idealAngles.y);
|
||||
float angleDiffPitch = AngleNormalize (direction.x - m_idealAngles.x);
|
||||
|
||||
const float delta = m_frameInterval;
|
||||
|
||||
if (angleDiffYaw < 1.0f && angleDiffYaw > -1.0f)
|
||||
{
|
||||
m_lookYawVel = 0.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue