From 9048c0a75c0e53201e0d8a66c0f569d22ced2abf Mon Sep 17 00:00:00 2001 From: nukeykt Date: Sat, 16 Nov 2019 21:27:44 +0900 Subject: [PATCH] Fix CheckCloseRange return value --- source/exhumed/src/gun.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/source/exhumed/src/gun.cpp b/source/exhumed/src/gun.cpp index 8dc22f6d7..240d6bf32 100644 --- a/source/exhumed/src/gun.cpp +++ b/source/exhumed/src/gun.cpp @@ -304,19 +304,13 @@ int CheckCloseRange(short nPlayer, int *x, int *y, int *z, short *nSector) *nSector = hitSect; if (hitSprite > -1) { - hitSprite |= 0xC000; + return hitSprite | 0xC000; } - else - { - if (hitWall > -1) { - hitSprite |= 0x8000; - } - else { - hitSprite = 0; - } + if (hitWall > -1) { + return hitWall | 0x8000; } - return hitSprite; + return 0; } void CheckClip(short nPlayer)