Skip to content

Commit 80bef56

Browse files
committed
feat: add pet animation toggle
On the player's side it shows as if nothing is happening, but others will see the player continuously walking and petting. This can result in the hand or pet being completely out of place (from other players POV). If the player currently doesn't have a pet equipped, other players will see the player continuously walking.
1 parent 899328c commit 80bef56

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Make sure you are only having one version of MalumMenu installed at a time, as h
8282
- **Meetings** (NEW!): Skip Meeting, VoteImmune, Eject Player
8383
- **Game State** (NEW!) ([#49](https://github.com/scp222thj/MalumMenu/pull/49)): Force Start Game, No Game End
8484
- **Passive**: Spoof Date to April 1st, Stealth Mode, Panic (Disable MalumMenu), Copy Lobby Code on Disconnect
85-
- **Animations**: (NEW!): Shields, Asteroids, Empty Garbage, Medbay Scan, Fake Cams In Use, Moonwalk
85+
- **Animations**: (NEW!): Shields, Asteroids, Empty Garbage, Medbay Scan, Fake Cams In Use, Pet, Moonwalk
8686
- **Config** (NEW!): Open plugin config, Reload plugin config, Save to Profile, Load from Profile, RGB Mode
8787
#### New features and QoL improvements
8888
- Added option to disable cheats in Passive category ([#164](https://github.com/scp222thj/MalumMenu/pull/164))

src/Cheats/MalumCheats.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,5 +461,13 @@ public static void AnimationCheat()
461461
_hasUsedCamsCheatBefore = false;
462462
}
463463

464+
if (CheatToggles.animPet && Utils.isPlayer && PlayerControl.LocalPlayer.cosmetics != null && PlayerControl.LocalPlayer.cosmetics.CurrentPet != null)
465+
{
466+
// Don't move the local player, just send the RPC so others see the petting animation.
467+
RpcPetMessage rpcMessage = new(PlayerControl.LocalPlayer.MyPhysics.NetId,
468+
PlayerControl.LocalPlayer.cosmetics.CurrentPet.PettingPlayerPosition,
469+
PlayerControl.LocalPlayer.cosmetics.CurrentPet.transform.position);
470+
AmongUsClient.Instance.LateBroadcastReliableMessage(Unsafe.As<IGameDataMessage>(rpcMessage));
471+
}
464472
}
465473
}

src/UI/CheatToggles.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public struct CheatToggles
129129
public static bool animEmptyGarbage;
130130
public static bool animScan;
131131
public static bool animCamsInUse;
132+
public static bool animPet;
132133

133134
//Config
134135
public static bool reloadConfig;

src/UI/MenuUI.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ private void Start()
193193
new ToggleInfo(" Empty Garbage", () => CheatToggles.animEmptyGarbage, x => CheatToggles.animEmptyGarbage = x),
194194
new ToggleInfo(" Medbay Scan", () => CheatToggles.animScan, x => CheatToggles.animScan = x),
195195
new ToggleInfo(" Fake Cams In Use", () => CheatToggles.animCamsInUse, x => CheatToggles.animCamsInUse = x),
196+
new ToggleInfo(" Pet", () => CheatToggles.animPet, x => CheatToggles.animPet = x)
196197
], [
197198
new SubmenuInfo("Client-Sided", false, [
198199
new ToggleInfo(" Moonwalk", () => CheatToggles.moonwalk, x => CheatToggles.moonwalk = x)

0 commit comments

Comments
 (0)