diff --git a/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerEntered_Patch.cs b/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerEntered_Patch.cs index 2fbab0f024..504a773049 100644 --- a/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerEntered_Patch.cs +++ b/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerEntered_Patch.cs @@ -63,10 +63,7 @@ public static IEnumerable Transpiler(MethodBase original, IEnum public static void Prefix() { - PlayerMotor motor = Player.main.playerController.activeController; - if (motor is GroundMotor groundMotor) - { - groundMotor.movingPlatform.movementTransfer = GroundMotor.MovementTransferOnJump.PermaLocked; - } + GroundMotor motor = Player.main.groundMotor; + motor.movingPlatform.movementTransfer = GroundMotor.MovementTransferOnJump.PermaLocked; } } diff --git a/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerExited_Patch.cs b/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerExited_Patch.cs index 562dacd6d7..5fbd3d6dfe 100644 --- a/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerExited_Patch.cs +++ b/NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerExited_Patch.cs @@ -13,10 +13,7 @@ public sealed partial class SubRoot_OnPlayerExited_Patch : NitroxPatch, IDynamic public static void Prefix() { - PlayerMotor motor = Player.main.playerController.activeController; - if (motor is GroundMotor groundMotor) - { - groundMotor.movingPlatform.movementTransfer = GroundMotor.MovementTransferOnJump.PermaTransfer; - } + GroundMotor motor = Player.main.groundMotor; + motor.movingPlatform.movementTransfer = GroundMotor.MovementTransferOnJump.PermaTransfer; } }