From f331df23c523ae47ae1affed1a14bd4332745097 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Mon, 22 May 2023 01:14:18 +0400 Subject: [PATCH] Add missing variables for playercontroller reset --- sources/NicePlayerController.uc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sources/NicePlayerController.uc b/sources/NicePlayerController.uc index dabd3d0..ccd38a9 100644 --- a/sources/NicePlayerController.uc +++ b/sources/NicePlayerController.uc @@ -212,6 +212,20 @@ simulated function ClientPostLogin(){ // Change HUD parameters class'ScrnHUD'.default.EnemyHealthBarHeight = 4.0; } + +// fix crooked camera after you die with active `ViewShake` +function StopViewShaking() { + ShakeRotMax = vect(0, 0, 0); + ShakeRotRate = vect(0, 0, 0); + ShakeRotTime = vect(0, 0, 0); + ShakeOffsetMax = vect(0, 0, 0); + ShakeOffsetRate = vect(0, 0, 0); + ShakeOffsetTime = vect(0, 0, 0); + // add missing variables + ShakeOffset = vect(0, 0, 0); + ShakeRot = Rot(0, 0, 0); +} + function ShowLobbyMenu(){ Super.ShowLobbyMenu(); } @@ -1225,7 +1239,7 @@ function LoadDualWieldables(){ local class WP; local class W; local int i; - + CPRL = class'ClientPerkRepLink'.Static.FindStats(self); if(CPRL == none || CPRL.ShopInventory.Length == 0) return;