diff options
author | James Haley | 2013-10-19 18:22:22 +0000 |
---|---|---|
committer | James Haley | 2013-10-19 18:22:22 +0000 |
commit | d6ca2360c88b3f07dc69d488d7bc611c92ec5c4e (patch) | |
tree | 7aca9a333b9a9c34dbbf510068df69545cc2e91d /src/strife | |
parent | 8ccb6eaf454574e3117fffc79c7ab51478c29d25 (diff) | |
download | chocolate-doom-d6ca2360c88b3f07dc69d488d7bc611c92ec5c4e.tar.gz chocolate-doom-d6ca2360c88b3f07dc69d488d7bc611c92ec5c4e.tar.bz2 chocolate-doom-d6ca2360c88b3f07dc69d488d7bc611c92ec5c4e.zip |
Correct up/down look logic that was incorrectly allowing 6 degrees of
additional freedom.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2713
Diffstat (limited to 'src/strife')
-rw-r--r-- | src/strife/p_user.c | 8 |
1 files 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; } } |