mirror of
https://github.com/ENSL/NS.git
synced 2024-11-30 08:20:56 +00:00
o Fixed bug that would cause charge to pushback only towards west.
o Minor charge tweaks. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@488 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
2585bdd529
commit
ab58736efb
1 changed files with 3 additions and 1 deletions
|
@ -6833,15 +6833,17 @@ void AvHPlayer::InternalMovementThink()
|
|||
float dot = DotProduct(heading, direction);
|
||||
if (dot > 0.0f)
|
||||
{
|
||||
direction[0] = 50;
|
||||
VectorScale(direction, factor * dot, direction);
|
||||
VectorAdd(theEntity->pev->velocity, direction, theEntity->pev->velocity);
|
||||
theEntity->pev->velocity[2] = max(181, theEntity->pev->velocity[2]);
|
||||
if (Length(theEntity->pev->velocity) > theEntity->pev->maxspeed * maxpushbackspeedfactor)
|
||||
{
|
||||
VectorNormalize(theEntity->pev->velocity);
|
||||
VectorScale(theEntity->pev->velocity, theEntity->pev->maxspeed * maxpushbackspeedfactor, theEntity->pev->velocity);
|
||||
}
|
||||
}
|
||||
|
||||
// ALERT(at_console, UTIL_VarArgs("direction %f %f %f heading %f %f %f endvel %f %f %f\n", direction[0], direction[1], direction[2], heading[0], heading[1], heading[2], theEntity->pev->velocity[0], theEntity->pev->velocity[1], theEntity->pev->velocity[2]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue