public static void Postfix(Bench __instance)
        {
            NitroxId id = NitroxEntity.GetId(__instance.gameObject);

            // Request to be downgraded to a transient lock so we can still simulate the positioning.
            simulationOwnership.RequestSimulationLock(id, SimulationLockType.TRANSIENT);

            localPlayer.AnimationChange(AnimChangeType.BENCH, AnimChangeState.OFF);
            __instance.StartCoroutine(ResetAnimationDelayed(__instance.standUpCinematicController.interpolationTimeOut));
        }
        public static void Postfix(Bench __instance)
        {
            NitroxId id = NitroxEntity.GetId(__instance.gameObject);

            // Request to be downgraded to a transient lock so we can still simulate the positioning.
            simulationOwnership.RequestSimulationLock(id, SimulationLockType.TRANSIENT);
            localPlayer.AnimationChange(AnimChangeType.BENCH, AnimChangeState.UNSET);
        }
Beispiel #3
0
        public void Update()
        {
            AnimChangeState underwaterState = (AnimChangeState)(Player.main.IsUnderwater() ? 1 : 0);

            if (lastUnderwaterState != underwaterState)
            {
                localPlayer.AnimationChange(AnimChangeType.UNDERWATER, underwaterState);
                lastUnderwaterState = underwaterState;
            }
        }
Beispiel #4
0
        private static void ReceivedSimulationLockResponse(NitroxId id, bool lockAquired, HandInteraction <Bench> context)
        {
            Bench bench = context.Target;

            if (lockAquired)
            {
                skipPrefix = true;
                bench.OnHandClick(context.GuiHand);
                localPlayer.AnimationChange(AnimChangeType.BENCH, AnimChangeState.ON);
                skipPrefix = false;
            }
            else
            {
                bench.gameObject.AddComponent <DenyOwnershipHand>();
                bench.isValidHandTarget = false;
            }
        }
Beispiel #5
0
        public override void Execute(MultiplayerClient client, string[] args)
        {
            assertMinimumArgs(args, 2);

            AnimChangeState state;

            if (args[1] == "on" || args[1] == "1" || args[1] == "true")
            {
                state = AnimChangeState.ON;
            }
            else if (args[1] == "off" || args[1] == "0" || args[1] == "false")
            {
                state = AnimChangeState.OFF;
            }
            else
            {
                state = AnimChangeState.UNSET;
            }

            localPlayer.AnimationChange((AnimChangeType)int.Parse(args[0]), state);
        }