diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 35dd61cd..451da5f3 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -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 {