Fix a too strict sanity check in void blaster_touch()

This sanity check caused a too early exit of the function if the player
stood directly in front of a wall and fires the blaster or hyper
blaster. Therefor the wall impact effect wasn't drawn. This commit
fixes issue #6. Many thanks to svdijk for narrowing this problem down to
somewhere between 3.00 and 4.00.
This commit is contained in:
Yamagi Burmeister 2012-08-26 10:24:55 +02:00
parent 67fb773a78
commit 8819ad1c9a

View file

@ -379,7 +379,7 @@ blaster_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
{
int mod;
if (!self || !other || !plane || !surf)
if (!self || !other)
{
G_FreeEdict(self);
return;
@ -390,7 +390,7 @@ blaster_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
return;
}
if (surf->flags & SURF_SKY)
if (!surf && (!surf->flags & SURF_SKY))
{
G_FreeEdict(self);
return;
@ -412,8 +412,11 @@ blaster_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
mod = MOD_BLASTER;
}
T_Damage(other, self, self->owner, self->velocity, self->s.origin,
plane->normal, self->dmg, 1, DAMAGE_ENERGY, mod);
if (plane)
{
T_Damage(other, self, self->owner, self->velocity, self->s.origin,
plane->normal, self->dmg, 1, DAMAGE_ENERGY, mod);
}
}
else
{