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();