From 102076dc5f2d96b17bd75228e931849b80e4adb3 Mon Sep 17 00:00:00 2001 From: sirlemonhead Date: Fri, 1 Nov 2019 00:36:20 +0000 Subject: [PATCH] Fix arrow trap - arrows were appearing to shoot out side-on --- source/exhumed/src/object.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/exhumed/src/object.cpp b/source/exhumed/src/object.cpp index 1dab10297..135622da5 100644 --- a/source/exhumed/src/object.cpp +++ b/source/exhumed/src/object.cpp @@ -1276,14 +1276,15 @@ void FuncTrap(int a, int b, int c) } int nBullet = BuildBullet(nSprite, nType, 0, 0, 0, sprite[nSprite].ang, 0, 1); + short nBulletSprite = nBullet & 0xFFFF; // isolate the sprite index (disregard top 16 bits) + if (nType == 15) { - sprite[nSprite].ang = Sin(sprite[nSprite].ang - 512); + sprite[nBulletSprite].ang = (sprite[nBulletSprite].ang - 512) & kAngleMask; D3PlayFX(StaticSound[kSound32], nSprite); } else { - short nBulletSprite = nBullet & 0xFFFF; // isolate the sprite index (disregard top 16 bits) sprite[nBulletSprite].clipdist = 50; short nWall = sTrap[nTrap].field_6; @@ -1309,7 +1310,7 @@ void FuncTrap(int a, int b, int c) case 0x30000: case 0x90000: case 0x80000: - case 0x0A0000: + case 0xA0000: return; default: