From 2f88e9c8ceb324563ef7e1d99de76f366e0a4ae9 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 10 Mar 2006 05:19:54 +0000 Subject: [PATCH] when loading a savegame, use the saved v_angle value, not angles which usually lacks pitch, this fixes the lack of view pitch when loading games git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6088 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/host_cmd.c b/host_cmd.c index cfa9bb3f..bed286c7 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -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); -- 2.39.2