From 76e658bf1b49322ea59ed2897cb624011e2b6afa Mon Sep 17 00:00:00 2001
From: toasterbabe <rollerorbital@gmail.com>
Date: Sun, 7 Aug 2016 00:21:16 +0100
Subject: [PATCH] Minor re-ordering to optimise this branch.

---
 src/hardware/hw_main.c | 4 ++--
 src/r_things.c         | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 7afef4d516..4c033043d6 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -5108,9 +5108,9 @@ static void HWR_ProjectSprite(mobj_t *thing)
 		// choose a different rotation based on player view
 		ang = R_PointToAngle (thing->x, thing->y) - thing->angle;
 
-		if ((ang < ANGLE_180) && (sprframe->rotate & SRF_RIGHT)) // See from right
+		if ((sprframe->rotate & SRF_RIGHT) && (ang < ANGLE_180)) // See from right
 			rot = 6; // F7 slot
-		else if ((ang >= ANGLE_180) && (sprframe->rotate & SRF_LEFT)) // See from left
+		else if ((sprframe->rotate & SRF_LEFT) && (ang >= ANGLE_180)) // See from left
 			rot = 2; // F3 slot
 		else // Normal behaviour
 			rot = (ang+ANGLE_202h)>>29;
diff --git a/src/r_things.c b/src/r_things.c
index a836aa88b9..6c26620fe9 100644
--- a/src/r_things.c
+++ b/src/r_things.c
@@ -1193,9 +1193,9 @@ static void R_ProjectSprite(mobj_t *thing)
 		// choose a different rotation based on player view
 		ang = R_PointToAngle (thing->x, thing->y) - thing->angle;
 
-		if ((ang < ANGLE_180) && (sprframe->rotate & SRF_RIGHT)) // See from right
+		if ((sprframe->rotate & SRF_RIGHT) && (ang < ANGLE_180)) // See from right
 			rot = 6; // F7 slot
-		else if ((ang >= ANGLE_180) && (sprframe->rotate & SRF_LEFT)) // See from left
+		else if ((sprframe->rotate & SRF_LEFT) && (ang >= ANGLE_180)) // See from left
 			rot = 2; // F3 slot
 		else // Normal behaviour
 			rot = (ang+ANGLE_202h)>>29;
-- 
GitLab