Fixed monster turn rate being too slow.

Fixed heavy weapons grunt AI being complete nonsense.
Small improvements to stukabat.
This commit is contained in:
Giegue
2023-03-06 02:08:37 -03:00
parent 750b916666
commit 73f240ddb1
7 changed files with 325 additions and 350 deletions

View File

@@ -39,6 +39,8 @@ extern DLL_GLOBAL BOOL g_fDrawLines;
extern CGraph WorldGraph;// the world node graph
extern cvar_t *monster_turn_coeficient;
//=========================================================
@@ -2234,7 +2236,22 @@ float CMBaseMonster::ChangeYaw ( int yawSpeed )
ideal = pev->ideal_yaw;
if (current != ideal)
{
speed = (float)yawSpeed * gpGlobals->frametime * 10;
// -SamVanheer
if ( m_flLastYawTime == 0 )
{
m_flLastYawTime = gpGlobals->time - gpGlobals->frametime;
}
float delta = gpGlobals->time - m_flLastYawTime;
if ( delta > 0.25 )
delta = 0.25;
// let server operators modify the multiplier coeficient -Giegue
float multiplier = monster_turn_coeficient->value;
if ( multiplier < 0.1 || multiplier > 10.0 )
multiplier = 1.75;
speed = (float)yawSpeed * delta * multiplier;
move = ideal - current;
if (ideal > current)