Bewegungscode aufgeräumt

This commit is contained in:
Yamagi Burmeister 2009-10-07 09:40:04 +00:00
parent 261c58d154
commit 3d80fd35eb

View file

@ -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;
}