ref: 5450e3af1e9545eb4f68af0fce120b24912da0ca
parent: 73fca33b06e2ebb61473d295fdd39f8bbf57e4dd
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Nov 10 15:38:54 EST 2023
Host_Spawn_f: correct view angles on game load (thanks mh)
--- a/host_cmd.c
+++ b/host_cmd.c
@@ -673,6 +673,7 @@
int i;
client_t *client;
edict_t *ent;
+ float *a;
if (cmd_source == src_command)
{
@@ -773,8 +774,9 @@
// with a permanent head tilt
ent = EDICT_NUM( 1 + (host_client - svs.clients) );
MSG_WriteByte (&host_client->message, svc_setangle);
- for (i=0 ; i < 2 ; i++)
- sv.protocol->MSG_WriteAngle (&host_client->message, ent->v.angles[i] );
+ a = sv.loadgame ? ent->v.v_angle : ent->v.angles;
+ for(i = 0; i < 2; i++)
+ sv.protocol->MSG_WriteAngle(&host_client->message, a[i]);
sv.protocol->MSG_WriteAngle (&host_client->message, 0 );
SV_WriteClientdataToMessage (sv_player, &host_client->message);