Bugfixes, damit die Demos wieder gehen. Kommt morgen noch mehr nach.

This commit is contained in:
Yamagi Burmeister 2009-10-03 17:26:02 +00:00
parent a417bed9fc
commit e39af72d14
2 changed files with 7 additions and 7 deletions

View file

@ -1030,7 +1030,7 @@ void SV_Shutdown (char *finalmsg, qboolean reconnect)
// free current level
if (sv.demofile)
fclose (sv.demofile);
FS_FCloseFile (sv.demofile);
memset (&sv, 0, sizeof(sv));
Com_SetServerState (sv.state);
@ -1040,7 +1040,7 @@ void SV_Shutdown (char *finalmsg, qboolean reconnect)
if (svs.client_entities)
Z_Free (svs.client_entities);
if (svs.demofile)
fclose (svs.demofile);
FS_FCloseFile (svs.demofile);
memset (&svs, 0, sizeof(svs));
}

View file

@ -438,7 +438,7 @@ void SV_DemoCompleted (void)
{
if (sv.demofile)
{
fclose (sv.demofile);
FS_FCloseFile (sv.demofile);
sv.demofile = NULL;
}
SV_Nextserver ();
@ -502,8 +502,8 @@ void SV_SendClientMessages (void)
else
{
// get the next message
r = fread (&msglen, 4, 1, sv.demofile);
if (r != 1)
r = FS_FRead (&msglen, 4, 1, sv.demofile);
if (r != 4)
{
SV_DemoCompleted ();
return;
@ -516,8 +516,8 @@ void SV_SendClientMessages (void)
}
if (msglen > MAX_MSGLEN)
Com_Error (ERR_DROP, "SV_SendClientMessages: msglen > MAX_MSGLEN");
r = fread (msgbuf, msglen, 1, sv.demofile);
if (r != 1)
r = FS_FRead (msgbuf, msglen, 1, sv.demofile);
if (r != msglen)
{
SV_DemoCompleted ();
return;