]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_demo.c
also support the .dir and .d extensions for virtual packs
[xonotic/darkplaces.git] / sv_demo.c
index d8f2bea90772bd07be69aecd71a30a6fbee1b6ee..81f169bb64b067a7ee5a065d157e964f13284bd6 100644 (file)
--- a/sv_demo.c
+++ b/sv_demo.c
@@ -13,7 +13,7 @@ void SV_StartDemoRecording(client_t *client, const char *filename, int forcetrac
 
        Con_Printf("Recording demo for # %d (%s) to %s\n", PRVM_NUM_FOR_EDICT(client->edict), client->netaddress, name);
 
-       client->sv_demo_file = FS_Open(name, "wb", false, false);
+       client->sv_demo_file = FS_OpenRealFile(name, "wb", false);
        if(!client->sv_demo_file)
        {
                Con_Print("ERROR: couldn't open.\n");
@@ -27,13 +27,15 @@ void SV_WriteDemoMessage(client_t *client, sizebuf_t *sendbuffer, qboolean clien
 {
        int len, i;
        float f;
+       int temp;
 
        if(client->sv_demo_file == NULL)
                return;
        if(sendbuffer->cursize == 0)
                return;
        
-       len = LittleLong(sendbuffer->cursize | (clienttoserver ? DEMOMSG_CLIENT_TO_SERVER : 0));
+       temp = sendbuffer->cursize | (clienttoserver ? DEMOMSG_CLIENT_TO_SERVER : 0);
+       len = LittleLong(temp);
        FS_Write(client->sv_demo_file, &len, 4);
        for(i = 0; i < 3; ++i)
        {