shithub: choc

Download patch

ref: d6ca2360c88b3f07dc69d488d7bc611c92ec5c4e
parent: 8ccb6eaf454574e3117fffc79c7ab51478c29d25
author: James Haley <[email protected]>
date: Sat Oct 19 14:22:22 EDT 2013

Correct up/down look logic that was incorrectly allowing 6 degrees of
additional freedom.

Subversion-branch: /branches/v2-branch
Subversion-revision: 2713

--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -248,8 +248,8 @@
     if (cmd->buttons2 & BT2_LOOKUP)
     {
         player->pitch += LOOKPITCHAMOUNT;
-        if ((player->pitch + LOOKPITCHAMOUNT) > LOOKUPMAX ||
-            (player->pitch + LOOKPITCHAMOUNT) < LOOKDOWNMAX)
+        if (player->pitch > LOOKUPMAX ||
+            player->pitch < LOOKDOWNMAX)
             player->pitch -= LOOKPITCHAMOUNT;
     }
     else
@@ -258,8 +258,8 @@
         if (cmd->buttons2 & BT2_LOOKDOWN)
         {
             player->pitch -= LOOKPITCHAMOUNT;
-            if ((player->pitch - LOOKPITCHAMOUNT) > LOOKUPMAX ||
-                (player->pitch - LOOKPITCHAMOUNT) < LOOKDOWNMAX)
+            if (player->pitch > LOOKUPMAX ||
+                player->pitch < LOOKDOWNMAX)
                 player->pitch += LOOKPITCHAMOUNT;
         }
     }