From e39ca3418a5af4599b8a35315ebce91c3f1261cd Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 16 Sep 2008 07:56:16 +0000 Subject: [PATCH] jumping corpse fix git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2644 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 2 +- source/src/physics.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index c193fe18..2effedea 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -1036,7 +1036,7 @@ void togglespect() // cycle through all spectating modes { int mode; if(player1->spectatemode==SM_NONE) mode = SM_FOLLOW1ST; // start with 1st person spect - else mode = SM_FOLLOW1ST + (((player1->spectatemode-1) % (SM_NUM-SM_FOLLOW1ST))); + else mode = SM_FOLLOW1ST + ((player1->spectatemode - SM_FOLLOW1ST + 1) % (SM_NUM-SM_FOLLOW1ST)); spectate(mode); } } diff --git a/source/src/physics.cpp b/source/src/physics.cpp index b6067c15..f8709c38 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -590,9 +590,9 @@ void attack(bool on) void jumpn(bool on) { if(intermission) return; - if(player1->isspectating() && lastmillis - player1->respawnoffset > 1000) + if(player1->isspectating()) { - if(on) togglespect(); + if(lastmillis - player1->respawnoffset > 1000 && on) togglespect(); } else if(player1->crouching) return; else player1->jumpnext = on;