mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-08 00:32:09 +00:00
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:
parent
67fb773a78
commit
8819ad1c9a
1 changed files with 7 additions and 4 deletions
|
@ -379,7 +379,7 @@ blaster_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||||
{
|
{
|
||||||
int mod;
|
int mod;
|
||||||
|
|
||||||
if (!self || !other || !plane || !surf)
|
if (!self || !other)
|
||||||
{
|
{
|
||||||
G_FreeEdict(self);
|
G_FreeEdict(self);
|
||||||
return;
|
return;
|
||||||
|
@ -390,7 +390,7 @@ blaster_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (surf->flags & SURF_SKY)
|
if (!surf && (!surf->flags & SURF_SKY))
|
||||||
{
|
{
|
||||||
G_FreeEdict(self);
|
G_FreeEdict(self);
|
||||||
return;
|
return;
|
||||||
|
@ -412,9 +412,12 @@ blaster_touch(edict_t *self, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||||
mod = MOD_BLASTER;
|
mod = MOD_BLASTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (plane)
|
||||||
|
{
|
||||||
T_Damage(other, self, self->owner, self->velocity, self->s.origin,
|
T_Damage(other, self, self->owner, self->velocity, self->s.origin,
|
||||||
plane->normal, self->dmg, 1, DAMAGE_ENERGY, mod);
|
plane->normal, self->dmg, 1, DAMAGE_ENERGY, mod);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gi.WriteByte(svc_temp_entity);
|
gi.WriteByte(svc_temp_entity);
|
||||||
|
|
Loading…
Reference in a new issue