Skip to content

Commit

Permalink
movementTransfer patch fix
Browse files Browse the repository at this point in the history
  • Loading branch information
killzoms committed Nov 19, 2023
1 parent 7466b8c commit 29300a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ public static IEnumerable<CodeInstruction> 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;
}
}
7 changes: 2 additions & 5 deletions NitroxPatcher/Patches/Dynamic/SubRoot_OnPlayerExited_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 29300a5

Please sign in to comment.