From 2bb80e3d0b9a26d86f2ce70be40ab8dff865e811 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 29 Jan 2018 18:18:31 +0100 Subject: [PATCH] - fixed: Upon resurrection, a monster must check if the current setting of the link flags (NOBLOCKMAP and NOSECTOR) match the defaults. --- src/p_mobj.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 79f549dd38..e0c9530d35 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -7766,7 +7766,13 @@ FState *AActor::GetRaiseState() void AActor::Revive() { AActor *info = GetDefault(); + FLinkContext ctx; + + bool flagchange = (flags & (MF_NOBLOCKMAP | MF_NOSECTOR)) != (info->flags & (MF_NOBLOCKMAP | MF_NOSECTOR)); + + if (flagchange) UnlinkFromWorld(&ctx); flags = info->flags; + if (flagchange) LinkToWorld(&ctx); flags2 = info->flags2; flags3 = info->flags3; flags4 = info->flags4;