From 79a66785706c1fede0a8d2133e1bb887904d7fd3 Mon Sep 17 00:00:00 2001 From: qndel Date: Wed, 27 Mar 2019 19:35:21 +0100 Subject: [PATCH] WallTrapLocOk bin exact (#755) --- Source/objects.cpp | 8 +++++--- Source/objects.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/objects.cpp b/Source/objects.cpp index d60b220b5..5651a404a 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -809,10 +809,12 @@ void __fastcall AddL3Objs(int x1, int y1, int x2, int y2) } } -BOOLEAN __fastcall WallTrapLocOk(int xp, int yp) +BOOL __fastcall WallTrapLocOk(int xp, int yp) { - return (~dFlags[xp][yp] & DFLAG_POPULATED) >> 3; -} + if (dFlags[xp][yp] & DFLAG_POPULATED) + return FALSE; + return TRUE; +} void __cdecl AddL2Torches() { diff --git a/Source/objects.h b/Source/objects.h index 66ee7b950..cad0f5a13 100644 --- a/Source/objects.h +++ b/Source/objects.h @@ -28,7 +28,7 @@ void __cdecl InitRndBarrels(); void __fastcall AddL1Objs(int x1, int y1, int x2, int y2); void __fastcall AddL2Objs(int x1, int y1, int x2, int y2); void __fastcall AddL3Objs(int x1, int y1, int x2, int y2); -BOOLEAN __fastcall WallTrapLocOk(int xp, int yp); +BOOL __fastcall WallTrapLocOk(int xp, int yp); void __cdecl AddL2Torches(); BOOL __fastcall TorchLocOK(int xp, int yp); void __cdecl AddObjTraps();