fix crash on calling votes from autoexec

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4442 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-05-26 12:33:49 +00:00
parent fe9f8ca05d
commit 2aea13c150
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -1
View File
@@ -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
+1 -1
View File
@@ -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
{