From 6a865abb93ac71486348b39aa171f46b23bd607c Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 6 Aug 2016 23:54:38 +0100 Subject: [PATCH] Bugfix for spike sound playing when attempting to attack non-solid spikes with CA_DASHMODE/CA_TWINSPIN/CA2_MELEE. --- src/p_map.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 8f6bd3577..b8123fc0c 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -443,7 +443,8 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; // underneath if (thing->type == MT_SPIKE) { - S_StartSound(tmthing, thing->info->deathsound); + if (thing->flags & MF_SOLID) + S_StartSound(tmthing, thing->info->deathsound); for (thing = thing->subsector->sector->thinglist; thing; thing = thing->snext) if (thing->type == MT_SPIKE && thing->health > 0 && thing->flags & MF_SOLID && P_AproxDistance(thing->x - tmthing->x, thing->y - tmthing->y) < FixedMul(56*FRACUNIT, thing->scale)) P_KillMobj(thing, tmthing, tmthing, 0); @@ -476,7 +477,8 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; // underneath if (thing->type == MT_SPIKE) { - S_StartSound(tmthing, thing->info->deathsound); + if (thing->flags & MF_SOLID) + S_StartSound(tmthing, thing->info->deathsound); for (thing = thing->subsector->sector->thinglist; thing; thing = thing->snext) if (thing->type == MT_SPIKE && thing->health > 0 && thing->flags & MF_SOLID && P_AproxDistance(thing->x - tmthing->x, thing->y - tmthing->y) < FixedMul(56*FRACUNIT, thing->scale)) P_KillMobj(thing, tmthing, tmthing, 0);