fix double initialization of roles

This commit is contained in:
XtraCube committed 2025-04-05 16:28:34 -04:00
1 parent 3e6eb49d93
commit 531a799a24
2 files changed
+14 -5

No files matched your search

+7
View File
@@ -1,5 +1,6 @@
using AmongUs.GameOptions;
using MiraAPI.Roles;
using Reactor.Utilities;
using TMPro;
using UnityEngine;
@@ -19,6 +20,12 @@ public class ChameloenRole : CrewmateRole, ICustomRole
IntroSound = CustomRoleUtils.GetIntroSound(RoleTypes.Shapeshifter),
};
public override void Initialize(PlayerControl player)
{
Player = player;
Logger<ExamplePlugin>.Error("Initializing ChamelonRole for player: " + player.PlayerId);
}
public void PlayerControlFixedUpdate(PlayerControl playerControl)
{
if (playerControl.MyPhysics.Velocity.magnitude > 0)