mirror of
https://github.com/yquake2/xatrix.git
synced 2024-11-10 06:42:22 +00:00
Merge pull request #84 from BjossiAlfreds/gladrange
Fixed stand-ground gladiators not attacking at certain range
This commit is contained in:
commit
9626e71c86
2 changed files with 24 additions and 12 deletions
|
@ -289,7 +289,12 @@ gladb_attack(edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
/* a small safe zone */
|
||||
/* 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))
|
||||
{
|
||||
VectorSubtract(self->s.origin, self->enemy->s.origin, v);
|
||||
range = VectorLength(v);
|
||||
|
||||
|
@ -297,6 +302,7 @@ gladb_attack(edict_t *self)
|
|||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* charge up the railgun */
|
||||
gi.sound(self, CHAN_WEAPON, sound_gun, 1, ATTN_NORM, 0);
|
||||
|
|
|
@ -275,7 +275,12 @@ gladiator_attack(edict_t *self)
|
|||
return;
|
||||
}
|
||||
|
||||
/* a small safe zone */
|
||||
/* 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))
|
||||
{
|
||||
VectorSubtract(self->s.origin, self->enemy->s.origin, v);
|
||||
range = VectorLength(v);
|
||||
|
||||
|
@ -283,6 +288,7 @@ gladiator_attack(edict_t *self)
|
|||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* charge up the railgun */
|
||||
gi.sound(self, CHAN_WEAPON, sound_gun, 1, ATTN_NORM, 0);
|
||||
|
|
Loading…
Reference in a new issue