diff options
Diffstat (limited to 'src/strife/g_game.c')
-rw-r--r-- | src/strife/g_game.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/strife/g_game.c b/src/strife/g_game.c index b8496a5b..c9d49c18 100644 --- a/src/strife/g_game.c +++ b/src/strife/g_game.c @@ -138,7 +138,7 @@ int gametic; int levelstarttic; // gametic at level start int totalkills, /*totalitems,*/ totalsecret; // for intermission -char demoname[32]; +char *demoname; boolean demorecording; boolean longtics; // cph's doom 1.91 longtics hack boolean lowres_turn; // low resolution turning for longtics @@ -2280,8 +2280,8 @@ void G_RecordDemo (char* name) int maxsize; usergame = false; - strcpy (demoname, name); - strcat (demoname, ".lmp"); + demoname = Z_Malloc(strlen(name) + 5, PU_STATIC, NULL); + sprintf(demoname, "%s.lmp", name); maxsize = 0x20000; //! @@ -2292,8 +2292,8 @@ void G_RecordDemo (char* name) // Specify the demo buffer size (KiB) // - i = M_CheckParm ("-maxdemo"); - if (i && i<myargc-1) + i = M_CheckParmWithArgs("-maxdemo", 1); + if (i) maxsize = atoi(myargv[i+1])*1024; demobuffer = Z_Malloc (maxsize,PU_STATIC,NULL); demoend = demobuffer + maxsize; @@ -2450,10 +2450,11 @@ void G_DoPlayDemo (void) // Play back a demo recorded in a netgame with a single player. // - if (playeringame[1] || M_CheckParm("-netdemo") > 0) - { - netgame = true; - netdemo = true; + if (playeringame[1] || M_CheckParm("-solo-net") > 0 + || M_CheckParm("-netdemo") > 0) + { + netgame = true; + netdemo = true; } // don't spend a lot of time in loadlevel |