diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index 617a169b..32b96263 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -950,7 +950,7 @@ void callvote(int type, char *arg1, char *arg2) void scallvote(char *type, char *arg1, char *arg2) { - if(type) + if(type && inmainloop) { int t = atoi(type); if(t==SA_MAP) // FIXME diff --git a/source/src/main.cpp b/source/src/main.cpp index 6330d179..b4a7ee35 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -551,7 +551,7 @@ void checkinput() VARF(gamespeed, 10, 100, 1000, if(multiplayer()) gamespeed = 100); VARF(paused, 0, 0, 1, if(multiplayer()) paused = 0); -bool firstrun = false; +bool firstrun = false, inmainloop = false; static int clockrealbase = 0, clockvirtbase = 0; static void clockreset() { clockrealbase = SDL_GetTicks(); clockvirtbase = totalmillis; } VARFP(clockerror, 990000, 1000000, 1010000, clockreset()); @@ -737,6 +737,7 @@ int main(int argc, char **argv) changemap("maps/ac_complex"); initlog("mainloop"); + inmainloop = true; #ifdef _DEBUG int lastflush = 0; #endif diff --git a/source/src/protos.h b/source/src/protos.h index e9796e50..c25cde0d 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -450,7 +450,7 @@ extern time_t now_utc; extern struct tm *systemtime(); extern void keyrepeat(bool on); -extern bool firstrun; +extern bool firstrun, inmainloop; enum {