From 150eb8fd7c3a81912499e1a5b0700b3cbb6894f3 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 5 Jul 2017 05:37:39 +0000 Subject: [PATCH] Fix a small regression with actions and improve performance while we're at it. git-svn-id: https://svn.eduke32.com/eduke32@6313 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index a83aed316..c83ccd9d5 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -3421,7 +3421,7 @@ static int G_MaybeTakeOnFloorPal(uspritetype *pSprite, int sectNum) template static int getofs_viewtype(int angDiff) { - return (((angDiff + 3072) & 2047) * rotations + 1024) >> 11; + return ((((angDiff + 3072) & 2047) * rotations + 1024) >> 11) % rotations; } template @@ -3429,8 +3429,7 @@ static int viewtype_mirror(uint16_t & cstat, int frameOffset) { if (frameOffset > rotations / 2) { - if (frameOffset < rotations) - cstat |= 4; + cstat |= 4; return rotations - frameOffset; }