From 607eb864002c938f853ee3754efe98e15c094013 Mon Sep 17 00:00:00 2001 From: Lucas GAUTHERON Date: Wed, 27 Apr 2011 12:38:24 +0000 Subject: [PATCH] drop camera when switching to fly spec mode git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6367 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 8f1a6ec9..0ebe91c4 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -1616,11 +1616,7 @@ void spectate(int mode) { if(player1->spectatemode != SM_FLY) { - player1->followplayercn = FPCN_FLY; - addmsg(SV_SPECTCN, "ri", player1->followplayercn); -#if 0 // FIXME - we can't call updatefollowplayer() here, because that would change followplayercn and send a SV_SPECTCN - // set spectator location to last followed player - playerent *f = updatefollowplayer(); + playerent *f = getclient(player1->followplayercn); if(f) { player1->o = f->o; @@ -1629,10 +1625,8 @@ void spectate(int mode) player1->resetinterp(); } else entinmap(player1); // or drop 'em at a random place -#else - entinmap(player1); // place near last location -#endif - + player1->followplayercn = FPCN_FLY; + addmsg(SV_SPECTCN, "ri", player1->followplayercn); } break; } @@ -1641,7 +1635,6 @@ void spectate(int mode) player1->spectatemode = mode; } - void togglespect() // cycle through all spectating modes { if(m_botmode) spectate(SM_FLY);