From: havoc Date: Fri, 10 Mar 2006 05:19:54 +0000 (+0000) Subject: when loading a savegame, use the saved v_angle value, not angles which usually lacks... X-Git-Tag: xonotic-v0.1.0preview~4228 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2f88e9c8ceb324563ef7e1d99de76f366e0a4ae9;p=xonotic%2Fdarkplaces.git 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 --- 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);