From 7e7f74206d5d56c5ddb554586021e237eaf0c08f Mon Sep 17 00:00:00 2001 From: nukeykt Date: Mon, 18 Nov 2019 04:13:56 +0900 Subject: [PATCH] Fix flamethrower light rotation --- source/exhumed/src/player.h | 2 +- source/exhumed/src/sequence.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/exhumed/src/player.h b/source/exhumed/src/player.h index eaf242ee9..28041811a 100644 --- a/source/exhumed/src/player.h +++ b/source/exhumed/src/player.h @@ -25,7 +25,7 @@ extern int nLocalPlayer; extern int lPlayerXVel; extern int lPlayerYVel; -extern int nPlayerDAng; +extern fix16_t nPlayerDAng; struct Player { diff --git a/source/exhumed/src/sequence.cpp b/source/exhumed/src/sequence.cpp index b29c44f37..124b145af 100644 --- a/source/exhumed/src/sequence.cpp +++ b/source/exhumed/src/sequence.cpp @@ -393,7 +393,7 @@ void seq_DrawPilotLightSeq(int xOffset, int yOffset) int x = ChunkXpos[nFrameBase] + (160 + xOffset); int y = ChunkYpos[nFrameBase] + (100 + yOffset); - rotatesprite(x << 16, y << 16, 0x10000, (-8 * nPlayerDAng) & kAngleMask, nTile, -127, 1, 2, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y); + rotatesprite(x << 16, y << 16, 0x10000, (-2 * fix16_to_int(nPlayerDAng)) & kAngleMask, nTile, -127, 1, 2, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y); nFrameBase++; } }