$curdemofile

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6432 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2011-05-14 15:09:47 +00:00
parent 1b2e2bde9f
commit ad48145196
3 changed files with 10 additions and 6 deletions
+6 -2
View File
@@ -1268,11 +1268,14 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
case SV_DEMOPLAYBACK:
{
extern string demofile;
getstring(demofile, p);
string demofile;
extern char *curdemofile;
getstring(demofile, p, MAXSTRLEN);
watchingdemo = demoplayback = demofile && demofile[0];
delete[] curdemofile;
if(demoplayback)
{
curdemofile = newstring(demofile);
player1->resetspec();
player1->state = CS_SPECTATE;
player1->team = TEAM_SPECT;
@@ -1280,6 +1283,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
else
{
// cleanups
curdemofile = newstring("n/a");
loopv(players) zapplayer(players[i]);
clearvote();
player1->state = CS_ALIVE;