workaround some map voting/spawning bugs in coop-edit

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4883 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2010-05-16 19:12:03 +00:00
parent 0fe4f792dd
commit e14191a722
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -242,7 +242,7 @@ struct client // server side version of "dynent" type
events.setsize(0);
overflow = 0;
timesync = false;
isonrightmap = false;
isonrightmap = m_coop;
spawnperm = SP_WRONGMAP;
spawnpermsent = servmillis;
if(!getmap)
+3 -3
View File
@@ -49,7 +49,7 @@ struct mapaction : serveraction
bool notify = valid_client(caller);
int maploc = MAP_NOTFOUND;
mapstats *ms = map[0] ? getservermapstats(map, false, &maploc) : NULL;
mapok = ms != NULL;
mapok = mode == GMODE_COOPEDIT || ms != NULL;
if(!mapok)
{
if(notify) sendservmsg("the server does not have this map", caller);
@@ -59,8 +59,8 @@ struct mapaction : serveraction
if(mode == GMODE_COOPEDIT && !strchr(scl.voteperm, 'e')) role = CR_ADMIN;
bool romap = mode == GMODE_COOPEDIT && readonlymap(maploc);
int smode = mode; // 'borrow' the mode macros by replacing a global by a local var
bool spawns = (m_teammode && !m_ktf) ? ms->hasteamspawns : ms->hasffaspawns;
bool flags = m_flags && !m_htf ? ms->hasflags : true;
bool spawns = mode == GMODE_COOPEDIT || (m_teammode && !m_ktf ? ms->hasteamspawns : ms->hasffaspawns);
bool flags = mode != GMODE_COOPEDIT && m_flags && !m_htf ? ms->hasflags : true;
if(!spawns || !flags || romap)
{ // unsupported mode
if(strchr(scl.voteperm, 'P')) role = CR_ADMIN;