mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 06:42:22 +00:00
Fixed stand-ground gladiators not attacking at certain range
This commit is contained in:
parent
1a3e721d51
commit
04c9248961
2 changed files with 24 additions and 12 deletions
|
@ -289,13 +289,19 @@ gladb_attack(edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
/* a small safe zone */
|
||||
VectorSubtract(self->s.origin, self->enemy->s.origin, v);
|
||||
range = VectorLength(v);
|
||||
|
||||
if (range <= (MELEE_DISTANCE + 32))
|
||||
/* a small safe zone
|
||||
but not for stand-ground ones since players can
|
||||
abuse it by standing still inside this range
|
||||
*/
|
||||
if (!(self->monsterinfo.aiflags & AI_STAND_GROUND))
|
||||
{
|
||||
return;
|
||||
VectorSubtract(self->s.origin, self->enemy->s.origin, v);
|
||||
range = VectorLength(v);
|
||||
|
||||
if (range <= (MELEE_DISTANCE + 32))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* charge up the railgun */
|
||||
|
|
|
@ -275,13 +275,19 @@ gladiator_attack(edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
/* a small safe zone */
|
||||
VectorSubtract(self->s.origin, self->enemy->s.origin, v);
|
||||
range = VectorLength(v);
|
||||
|
||||
if (range <= (MELEE_DISTANCE + 32))
|
||||
/* a small safe zone
|
||||
but not for stand-ground ones since players can
|
||||
abuse it by standing still inside this range
|
||||
*/
|
||||
if (!(self->monsterinfo.aiflags & AI_STAND_GROUND))
|
||||
{
|
||||
return;
|
||||
VectorSubtract(self->s.origin, self->enemy->s.origin, v);
|
||||
range = VectorLength(v);
|
||||
|
||||
if (range <= (MELEE_DISTANCE + 32))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* charge up the railgun */
|
||||
|
|
Loading…
Reference in a new issue