From 1767dd6a420ac7a2426e215d84783d375ecf7628 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 May 2017 11:54:49 +0200 Subject: [PATCH] - fixed: A_CheckBlock performed item pickup checks which could be done in completely inappropriate spots if this function was used from weapon overlays, for example. --- src/p_map.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index d997cffe6..5a5a10126 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2763,7 +2763,11 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags) FCheckPosition tm; double newz = thing->Z(); - if (!P_CheckPosition(thing, pos, tm)) + auto f1 = thing->flags & MF_PICKUP; + thing->flags &= MF_PICKUP; + auto res = P_CheckPosition(thing, pos, tm); + thing->flags |= f1; + if (!res) { // Ignore PCM_DROPOFF. Not necessary here: a little later it is. if (!flags || (!(flags & PCM_NOACTORS) && !(flags & PCM_NOLINES)))