From 45b61fde60e60da2ec1e728ec8e540027a5c58ac Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Wed, 15 May 2024 08:50:40 +0200 Subject: [PATCH] Restructure game init --- Fika.Core/Coop/GameMode/CoopGame.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Fika.Core/Coop/GameMode/CoopGame.cs b/Fika.Core/Coop/GameMode/CoopGame.cs index ec873685..22f1911a 100644 --- a/Fika.Core/Coop/GameMode/CoopGame.cs +++ b/Fika.Core/Coop/GameMode/CoopGame.cs @@ -660,8 +660,8 @@ public override async Task vmethod_2(int playerId, Vector3 position LocalPlayer myPlayer = await CoopPlayer.Create(playerId, spawnPoint.Position, spawnPoint.Rotation, "Player", "Main_", EPointOfView.FirstPerson, profile, false, UpdateQueue, Player.EUpdateMode.Auto, Player.EUpdateMode.Auto, - GClass549.Config.CharacterController.ClientPlayerMode, () => Singleton.Instance.Control.Settings.MouseSensitivity, - () => Singleton.Instance.Control.Settings.MouseAimingSensitivity, new GClass1445(), MatchmakerAcceptPatches.IsServer ? 0 : 1000, questController); + GClass549.Config.CharacterController.ClientPlayerMode, getSensitivity, + getAimingSensitivity, new GClass1445(), MatchmakerAcceptPatches.IsServer ? 0 : 1000, questController); profile.SetSpawnedInSession(profile.Side == EPlayerSide.Savage); @@ -1009,6 +1009,10 @@ public override IEnumerator vmethod_4(float startDelay, BotControllerSettings co Logger.LogError("CoopGame::vmethod_4: Halloween controller could not be instantiated!"); } } + if (GClass549.Config.FixedFrameRate > 0f) + { + FixedDeltaTime = 1f / GClass549.Config.FixedFrameRate; + } bool isWinter = BackEndSession.IsWinter; Class420 winterEventController = new();