From 558a59338b774be092811eb1fb7947c44795aef8 Mon Sep 17 00:00:00 2001 From: driAn Date: Tue, 6 May 2008 19:01:34 +0000 Subject: [PATCH] set "embody" as default spect mode, more convenient spawning in "fly" mode git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1886 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 7 +++++++ source/src/clients2c.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 2ed52259..1714bc4e 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -851,6 +851,13 @@ void spectate() { if(player1->state==CS_ALIVE) return; showscores(false); + if(player1->spectating != SM_NONE && players.inrange(player1->followplayercn)) + { + // set spectator location to last followed player + playerent *f = players[player1->followplayercn]; + player1->o = f->o; + player1->yaw = f->yaw; + } player1->spectating = SM_FLY; } diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index f0fc39e2..f6983a3f 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -653,7 +653,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p) if(demoplayback) { player1->state = CS_SPECTATE; - player1->spectating = SM_FLY; + player1->spectating = SM_EMBODYPLAYER; } else {