]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
when loading a savegame, use the saved v_angle value, not angles which usually lacks...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 10 Mar 2006 05:19:54 +0000 (05:19 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 10 Mar 2006 05:19:54 +0000 (05:19 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6088 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c

index cfa9bb3fcf9eb49e9f53677d4f6eb49d1a78afd6..bed286c7a54eb11c6b6fc0ea9b64d457d9d8da5f 100644 (file)
@@ -1421,10 +1421,21 @@ void Host_Spawn_f (void)
        // in a state where it is expecting the client to correct the angle
        // and it won't happen if the game was just loaded, so you wind up
        // with a permanent head tilt
-       MSG_WriteByte (&host_client->netconnection->message, svc_setangle);
-       MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->angles[0], sv.protocol);
-       MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->angles[1], sv.protocol);
-       MSG_WriteAngle (&host_client->netconnection->message, 0, sv.protocol);
+       if (sv.loadgame)
+       {
+               MSG_WriteByte (&host_client->netconnection->message, svc_setangle);
+               MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->v_angle[0], sv.protocol);
+               MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->v_angle[1], sv.protocol);
+               MSG_WriteAngle (&host_client->netconnection->message, 0, sv.protocol);
+               sv.loadgame = false; // we're basically done with loading now
+       }
+       else
+       {
+               MSG_WriteByte (&host_client->netconnection->message, svc_setangle);
+               MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->angles[0], sv.protocol);
+               MSG_WriteAngle (&host_client->netconnection->message, host_client->edict->fields.server->angles[1], sv.protocol);
+               MSG_WriteAngle (&host_client->netconnection->message, 0, sv.protocol);
+       }
 
        SV_WriteClientdataToMessage (host_client, host_client->edict, &host_client->netconnection->message, stats);