From 0a077bbae33858b6b20bba3cecb3fdad20727c06 Mon Sep 17 00:00:00 2001 From: flowtron Date: Sat, 9 Oct 2010 22:59:24 +0000 Subject: [PATCH] TESTING: avoid being stuck in editmode + minor stuff git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5737 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 2 +- source/src/editing.cpp | 6 +++++- source/src/protos.h | 2 +- source/src/renderhud.cpp | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index c91f7f87..9ffaf097 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -574,7 +574,7 @@ void spawnplayer(playerent *d) { d->respawn(); d->spawnstate(gamemode); - d->state = d==player1 && editmode ? CS_EDITING : CS_ALIVE; + d->state = CS_ALIVE;//TESTING:avoid being stuck in editmode// (d==player1 && editmode) ? CS_EDITING : CS_ALIVE; findplayerstart(d); } diff --git a/source/src/editing.cpp b/source/src/editing.cpp index 21db357a..a819edac 100644 --- a/source/src/editing.cpp +++ b/source/src/editing.cpp @@ -35,7 +35,11 @@ VAR(editing, 1, 0, 0); void toggleedit(bool force) { if(player1->state==CS_DEAD) return; // do not allow dead players to edit to avoid state confusion - if(!force && !editmode && !allowedittoggle()) return; // not in most multiplayer modes + if(!force && !editmode && !allowedittoggle()) + { + if(player1->state==CS_EDITING) player1->state = CS_ALIVE; //TESTING: avoid being stuck in editmode + return; // not in most multiplayer modes + } if(!(editmode = !editmode)) { entinmap(player1); // find spawn closest to current floating pos diff --git a/source/src/protos.h b/source/src/protos.h index f9bd7457..1883623a 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -342,7 +342,7 @@ extern void c2sinfo(playerent *d); extern void c2skeepalive(); extern void neterr(const char *s); extern int getclientnum(); -extern void changeteam(int team, bool respawn = true); +extern void changeteam(int team, bool respawn = true); // deprecated? extern void getmap(); extern void newteam(char *name); extern bool securemapcheck(const char *map, bool msg = true); diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index a96fba68..2da69784 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -920,7 +920,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat { glLoadIdentity(); glOrtho(0, VIRTW, VIRTH, 0, -1, 1); - const char *specttext = "GHOST [free]";//SPECTATING"; + const char *specttext = "GHOST"; if(player1->team == TEAM_SPECT) specttext = "GHOST"; else if(player1->team == TEAM_CLA_SPECT) specttext = "[CLA]"; else if(player1->team == TEAM_RVSF_SPECT) specttext = "[RVSF]";