Skip to content

Commit

Permalink
Fix slow motion client/bot instances
Browse files Browse the repository at this point in the history
  • Loading branch information
paulov-t committed Dec 19, 2023
1 parent c1ef58c commit ddfa536
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Source/Coop/Components/CoopGameComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,9 +1015,11 @@ private LocalPlayer CreateLocalPlayer(Profile profile, Vector3 position, int pla
, profile
, aiControl: useAiControl
, EUpdateQueue.Update
, EFT.Player.EUpdateMode.Manual
, EFT.Player.EUpdateMode.Auto
, EFT.Player.EUpdateMode.Auto
, BackendConfigManager.Config.CharacterController.ClientPlayerMode
// Cant use ObservedPlayerMode, it causes the player to fall through the floor and die
//, BackendConfigManager.Config.CharacterController.ObservedPlayerMode
, BackendConfigManager.Config.CharacterController.BotPlayerMode
, () => Singleton<SettingsManager>.Instance.Control.Settings.MouseSensitivity
, () => Singleton<SettingsManager>.Instance.Control.Settings.MouseAimingSensitivity
, FilterCustomizationClass.Default
Expand Down
9 changes: 6 additions & 3 deletions Source/Coop/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public static async Task<LocalPlayer>
, playerId
, position
, updateQueue
, EFT.Player.EUpdateMode.Manual
, EFT.Player.EUpdateMode.Manual
, armsUpdateMode
, bodyUpdateMode
, characterControllerMode
, getSensitivity
, getAimingSensitivity
Expand Down Expand Up @@ -104,8 +104,11 @@ await player
player.AIData = new AIData(null, player);
player.AggressorFound = false;
player._animators[0].enabled = true;
player._animators[0].speed = isYourPlayer ? 0.9f : 0.8f;
player.BepInLogger = BepInEx.Logging.Logger.CreateLogSource("CoopPlayer");
if (!player.IsYourPlayer)
{
player._armsUpdateQueue = EUpdateQueue.Update;
}

// If this is a Client Drone add Player Replicated Component
if (isClientDrone)
Expand Down

0 comments on commit ddfa536

Please sign in to comment.