mirror of
https://github.com/yquake2/zaero.git
synced 2024-11-10 06:32:04 +00:00
Bewegungscode aufgeräumt
This commit is contained in:
parent
261c58d154
commit
3d80fd35eb
1 changed files with 26 additions and 24 deletions
|
@ -409,7 +409,7 @@ void SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
|
|||
float d[3];
|
||||
float tdir, olddir, turnaround;
|
||||
|
||||
// how did we get here without an enemy?
|
||||
//FIXME: how did we get here with no enemy
|
||||
if (!enemy)
|
||||
return;
|
||||
|
||||
|
@ -509,6 +509,7 @@ qboolean SV_CloseEnough (edict_t *ent, edict_t *goal, float dist)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
======================
|
||||
M_MoveToGoal
|
||||
|
@ -589,14 +590,14 @@ qboolean M_MoveAwayFromFlare(edict_t *self, float dist)
|
|||
AngleVectors(self->s.angles, forward, NULL, NULL);
|
||||
VectorMA(self->s.origin, 128, forward, goal->s.origin);
|
||||
}
|
||||
else /* e != NULL */
|
||||
else
|
||||
{
|
||||
VectorSubtract(self->s.origin, e->s.origin, delta);
|
||||
VectorNormalize(delta);
|
||||
VectorMA(self->s.origin, 128, delta, goal->s.origin);
|
||||
}
|
||||
|
||||
if (rand() & 7 == 1)
|
||||
if (rand() & (7 == 1))
|
||||
{
|
||||
// set the ideal_yaw
|
||||
VectorSubtract(goal->s.origin, self->s.origin, delta);
|
||||
|
@ -613,3 +614,4 @@ qboolean M_MoveAwayFromFlare(edict_t *self, float dist)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue