Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
scp222thj committed Jun 10, 2024
1 parent 7877733 commit 7dbd22b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Patches/OtherPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void Prefix(PlatformSpecificData __instance)
public static class SystemInfo_deviceUniqueIdentifier_Getter
{
// Postfix patch of SystemInfo.deviceUniqueIdentifier Getter method
// to hide the user's real unique deviceId by generating a random fake one
// Made to hide the user's real unique deviceId by generating a random fake one
public static void Postfix(ref string __result)
{
if (MalumMenu.spoofDeviceId.Value){
Expand Down
4 changes: 4 additions & 0 deletions src/Patches/PlayerPhysicsPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ public static void Postfix(PlayerPhysics __instance)
[HarmonyPatch(typeof(PlayerPhysics), nameof(PlayerPhysics.SetNormalizedVelocity))]
public static class PlayerPhysics_SetNormalizedVelocity
{
// Prefix patch of PlayerPhysics.SetNormalizedVelocity to double the player's speed when the speedBoost cheat is enabled
public static bool Prefix(PlayerPhysics __instance, Vector2 direction)
{
if (CheatToggles.speedBoost){

// Cheat multiplier
float cheatSpeed = 2f;

// Actual speed of player (no hacks)
float actualSpeed = PlayerControl.LocalPlayer.MyPhysics.Speed * PlayerControl.LocalPlayer.MyPhysics.SpeedMod;

PlayerControl.LocalPlayer.MyPhysics.body.velocity = direction * actualSpeed * cheatSpeed;
Expand Down

0 comments on commit 7dbd22b

Please sign in to comment.