// StDreamTunnelDash check handled in IL hook
 private static void Player_OnCollideV(On.Celeste.Player.orig_OnCollideV orig, Player self, CollisionData data)
 {
     if (!self.DreamTunnelDashCheck(Vector2.UnitY * Math.Sign(self.Speed.Y)))
     {
         orig(self, data);
     }
 }
Exemple #2
0
        private void Player_OnCollideV(On.Celeste.Player.orig_OnCollideV orig, Player self, CollisionData data)
        {
            // Prevent dust particles / footstep sounds

            MarioClearPipeInteraction interaction = self.Get <MarioClearPipeInteraction>();
            bool inClearPipe = interaction != null && interaction.CurrentClearPipe != null;

            if (!inClearPipe)
            {
                orig(self, data);
            }
        }
Exemple #3
0
        private static void onPlayerOnCollideV(On.Celeste.Player.orig_OnCollideV orig, Player self, CollisionData data)
        {
            // we just want to kill a piece of code that executes in these conditions (supposed to push the player left or right when hitting a wall angle).
            if (self.StateMachine.State != 19 && self.StateMachine.State != 3 && self.StateMachine.State != 9 && self.Speed.Y < 0 &&
                self.CollideCheckOutside <UpsideDownJumpThru>(self.Position - Vector2.UnitY))
            {
                // kill the player's vertical speed.
                self.Speed.Y = 0;

                // reset varJumpTimer to prevent a weird "stuck on ceiling" effect.
                playerVarJumpTimer.SetValue(self, 0);
            }

            orig(self, data);
        }
 private static void Player_OnCollideV(On.Celeste.Player.orig_OnCollideV orig, Player self, CollisionData data)
 {
     if (self.StateMachine.State == Player.StDash || self.StateMachine.State == Player.StRedDash)
     {
         bool flag14 = DreamDashCheck(self, Vector2.UnitY * Math.Sign(self.Speed.Y));
         if (flag14)
         {
             self.StateMachine.State = FrostModule.CustomDreamDashState;
             DynData <Player> ddata = new DynData <Player>(self);
             ddata.Set("dashAttackTimer", 0f);
             ddata.Set("gliderBoostTimer", 0f);
             return;
         }
     }
     if (self.StateMachine.State != FrostModule.CustomDreamDashState)
     {
         orig(self, data);
     }
 }
 private static void Player_OnCollideV(On.Celeste.Player.orig_OnCollideV orig, Player self, CollisionData data) =>
 Player_OnCollide(new Action <Player, CollisionData>(orig), self, data);