mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-21 08:51:30 +00:00
Fix floater melee / zap damage getting applied if enemy is out of range.
Found by @BjossiAlfreds, closes #454.
This commit is contained in:
parent
a942ca4bba
commit
0286cdcd0b
1 changed files with 7 additions and 3 deletions
|
@ -665,9 +665,13 @@ floater_zap(edict_t *self)
|
||||||
gi.WriteByte(1); /* sparks */
|
gi.WriteByte(1); /* sparks */
|
||||||
gi.multicast(origin, MULTICAST_PVS);
|
gi.multicast(origin, MULTICAST_PVS);
|
||||||
|
|
||||||
T_Damage(self->enemy, self, self, dir, self->enemy->s.origin,
|
if (range(self, self->enemy) && infront(self, self->enemy) &&
|
||||||
vec3_origin, 5 + randk() % 6, -10, DAMAGE_ENERGY,
|
visible(self, self->enemy))
|
||||||
MOD_UNKNOWN);
|
{
|
||||||
|
T_Damage(self->enemy, self, self, dir, self->enemy->s.origin,
|
||||||
|
vec3_origin, 5 + randk() % 6, -10, DAMAGE_ENERGY,
|
||||||
|
MOD_UNKNOWN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue