]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_demo.c
make CSQC support the >0.05s/<0.0005s handling of standard player physics so CSQC...
[xonotic/darkplaces.git] / sv_demo.c
index c237f2f43a4b649189779509c179fe6cca596306..cc94a2c05aa5d1e6d41b04031651060d41bdc77e 100644 (file)
--- a/sv_demo.c
+++ b/sv_demo.c
@@ -5,6 +5,7 @@ extern cvar_t sv_autodemo_perclient_discardable;
 
 void SV_StartDemoRecording(client_t *client, const char *filename, int forcetrack)
 {
+       prvm_prog_t *prog = SVVM_prog;
        char name[MAX_QPATH];
 
        if(client->sv_demo_file != NULL)
@@ -30,6 +31,7 @@ void SV_StartDemoRecording(client_t *client, const char *filename, int forcetrac
 
 void SV_WriteDemoMessage(client_t *client, sizebuf_t *sendbuffer, qboolean clienttoserver)
 {
+       prvm_prog_t *prog = SVVM_prog;
        int len, i;
        float f;
        int temp;
@@ -44,7 +46,7 @@ void SV_WriteDemoMessage(client_t *client, sizebuf_t *sendbuffer, qboolean clien
        FS_Write(client->sv_demo_file, &len, 4);
        for(i = 0; i < 3; ++i)
        {
-               f = LittleFloat(client->edict->fields.server->v_angle[i]);
+               f = LittleFloat(PRVM_serveredictvector(client->edict, v_angle)[i]);
                FS_Write(client->sv_demo_file, &f, 4);
        }
        FS_Write(client->sv_demo_file, sendbuffer->data, sendbuffer->cursize);
@@ -52,6 +54,7 @@ void SV_WriteDemoMessage(client_t *client, sizebuf_t *sendbuffer, qboolean clien
 
 void SV_StopDemoRecording(client_t *client)
 {
+       prvm_prog_t *prog = SVVM_prog;
        sizebuf_t buf;
        unsigned char bufdata[64];