fixed setnext bug (thanks to RR and Jack for filling me in)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6250 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
sireus
2011-04-15 22:13:33 +00:00
parent cb9426f0c1
commit 7b06b9d7d1
2 changed files with 8 additions and 8 deletions
+1 -6
View File
@@ -2176,12 +2176,7 @@ bool scallvote(voteinfo *v, ENetPacket *msg) // true if a regular vote was calle
}
else
{
if ( v->type == SA_MAP && v->num >= GMODE_NUM )
{
map_queued = true;
nextgamemode = v->num-GMODE_NUM;
copystring(nextmapname, v->text);
}
if ( v->type == SA_MAP && v->num >= GMODE_NUM ) map_queued = true;
if (!v->gonext) sendpacket(-1, 1, msg, v->owner); // FIXME in fact, all votes should go to the server, registered, and then go back to the clients
else callvotepacket (-1, v); // also, no vote should exclude the caller... these would provide many code advantages/facilities
scallvotesuc(v); // but we cannot change the vote system now for compatibility issues... so, TODO
+7 -2
View File
@@ -40,8 +40,12 @@ struct mapaction : serveraction
bool mapok, queue;
void perform()
{
if (queue) return;
if(isdedicated && numclients() > 2 && smode >= 0 && smode != 1 && ( gamemillis > gamelimit/4 || scl.demo_interm ))
if(queue)
{
nextgamemode = mode;
copystring(nextmapname, map);
}
else if(isdedicated && numclients() > 2 && smode >= 0 && smode != 1 && ( gamemillis > gamelimit/4 || scl.demo_interm ))
{
forceintermission = true;
nextgamemode = mode;
@@ -106,6 +110,7 @@ struct mapaction : serveraction
else mapok = true;
area |= EE_LOCAL_SERV; // local too
formatstring(desc)("load map '%s' in mode '%s'", map, modestr(mode));
if(q) concatstring(desc, " (in the next game)");
}
~mapaction() { DELETEA(map); }
};