commit d6ca2360c88b3f07dc69d488d7bc611c92ec5c4e
Author: James Haley <haleyjd@hotmail.com>
AuthorDate: Sat Oct 19 18:22:22 2013 +0000
Commit: James Haley <haleyjd@hotmail.com>
CommitDate: Sat Oct 19 18:22:22 2013 +0000
Correct up/down look logic that was incorrectly allowing 6 degrees of
additional freedom.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2713
---
src/strife/p_user.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/strife/p_user.c b/src/strife/p_user.c
index aa2ba430..a6d74b9f 100644
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -248,8 +248,8 @@ void P_MovePlayer (player_t* player)
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 @@ void P_MovePlayer (player_t* player)
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;
}
}