From e43f21cdda4a75dd5ab089316680cdba32c27c33 Mon Sep 17 00:00:00 2001 From: wolfy852 Date: Sat, 13 Feb 2016 17:30:07 -0600 Subject: [PATCH] Fix dead MF_PAIN objects hurting the player Fixes #12 --- src/p_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_map.c b/src/p_map.c index 7ff913a8..61d57dcd 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -503,7 +503,7 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; // overhead if (thing->z + thing->height < tmthing->z) return true; // underneath - if (tmthing->player && tmthing->flags & MF_SHOOTABLE) + if (tmthing->player && tmthing->flags & MF_SHOOTABLE && thing->health > 0) P_DamageMobj(tmthing, thing, thing, 1); return true; } @@ -514,7 +514,7 @@ static boolean PIT_CheckThing(mobj_t *thing) return true; // overhead if (tmthing->z + tmthing->height < thing->z) return true; // underneath - if (thing->player && thing->flags & MF_SHOOTABLE) + if (thing->player && thing->flags & MF_SHOOTABLE && tmthing->health > 0) P_DamageMobj(thing, tmthing, tmthing, 1); return true; }