From ee1ffd23474dfe5065171e7511a2e379521a995f Mon Sep 17 00:00:00 2001 From: Mitchell Richters <mjr4077au@gmail.com> Date: Fri, 10 Dec 2021 17:26:56 +1100 Subject: [PATCH] - Duke: Fix lotag signedness issue affecting SE10 (door auto-close). * Originated in 01abe7b2ac8558bfd979f8ed115e8779f8142158 while removing a casting to short. * Fixes #594. --- source/games/duke/src/actors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index beacd0f2f..a59ac34e6 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -3586,7 +3586,7 @@ void handle_se10(DDukeActor* actor, const int* specialtags) auto sc = actor->getSector(); int sh = s->hitag; - if ((sc->lotag & 0xff) == 27 || (sc->floorz > sc->ceilingz && (sc->lotag & 0xff) != 23) || sc->lotag == 65536 - 32791) + if ((sc->lotag & 0xff) == 27 || (sc->floorz > sc->ceilingz && (sc->lotag & 0xff) != 23) || sc->lotag == 32791 - 65536) { int j = 1;