From 481b8de46dc76823fe0d420a40cccd8039f1f3ed Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Wed, 27 Mar 2024 13:09:21 +0700 Subject: [PATCH] update player centering in G_DoLoadLevel (#1622) --- src/g_game.c | 5 ++++- src/mn_setup.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 52c89cf3..4bb1aae9 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -54,6 +54,7 @@ #include "mn_menu.h" #include "m_misc.h" #include "m_random.h" +#include "mn_setup.h" #include "mn_snapshot.h" #include "m_swap.h" // [FG] LONG #include "memio.h" @@ -959,7 +960,6 @@ static void G_DoLoadLevel(void) critical = (gameaction == ga_playdemo || demorecording || demoplayback || D_CheckNetConnect()); - P_UpdateDirectVerticalAiming(); P_UpdateCheckSight(); // [crispy] pistol start @@ -969,6 +969,9 @@ static void G_DoLoadLevel(void) } P_SetupLevel (gameepisode, gamemap, 0, gameskill); + + MN_UpdateFreeLook(); + // [Woof!] Do not reset chosen player view across levels in multiplayer // demo playback. However, it must be reset when starting a new game. if (usergame) diff --git a/src/mn_setup.c b/src/mn_setup.c index 95e9b73a..baa0839e 100644 --- a/src/mn_setup.c +++ b/src/mn_setup.c @@ -2099,7 +2099,7 @@ void MN_UpdateFreeLook(void) { P_UpdateDirectVerticalAiming(); - if (!mouselook || !padlook) + if (!mouselook && !padlook) { for (int i = 0; i < MAXPLAYERS; ++i) {