From 538de72c941c88062c8f2662a50942ccdcb1ad4a Mon Sep 17 00:00:00 2001 From: Zwelf Date: Thu, 2 Jul 2020 14:02:19 +0200 Subject: [PATCH] Don't load movement and pause state when rescuing --- src/game/server/entities/character.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index a9ca07a3a..82705ba47 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -2402,8 +2402,9 @@ void CCharacter::DDRaceInit() void CCharacter::Rescue() { - if (m_SetSavePos && !m_Super) { - if (m_LastRescue + g_Config.m_SvRescueDelay * Server()->TickSpeed() > Server()->Tick()) + if(m_SetSavePos && !m_Super) + { + if(m_LastRescue + g_Config.m_SvRescueDelay * Server()->TickSpeed() > Server()->Tick()) { char aBuf[256]; str_format(aBuf, sizeof(aBuf), "You have to wait %d seconds until you can rescue yourself", (int)((m_LastRescue + g_Config.m_SvRescueDelay * Server()->TickSpeed() - Server()->Tick()) / Server()->TickSpeed())); @@ -2411,12 +2412,13 @@ void CCharacter::Rescue() return; } - float StartTime = m_StartTime; m_RescueTee.load(this, Team()); // Don't load these from saved tee: m_Core.m_Vel = vec2(0, 0); m_Core.m_HookState = HOOK_IDLE; m_StartTime = StartTime; + m_SavedInput.m_Direction = 0; + m_pPlayer->Pause(CPlayer::PAUSE_NONE, true); } }