Example #1
0
        public void setIsPushedByArcaneLevitator(bool isPushedWanted)
        {
            if (isPushedWanted && !this.MovementInfo.IsPushedByArcaneLevitator)
            {
                ArcaneLevitatorSpeed.StartLevitation();
            }

            if (!isPushedWanted)
            {
                GravitySpeed.Reset();
            }

            this.MovementInfo.IsPushedByArcaneLevitator = isPushedWanted;
            this.mMesh.AnimMgr.DeleteAllAnims();
        }
Example #2
0
 private void OnFall(bool isFalling)
 {
     if (isFalling)
     {
         this.mMesh.JumpLoop();
         GravitySpeed.Reset();
     }
     else
     {
         if (GravitySpeed.GetTimeSinceFall() >= 600)
         {
             this.Hit(GravitySpeed.GetSpeed() / GravitySpeed.SPEED_TMAX * VanillaPlayer.DEFAULT_PLAYER_LIFE * 0.8f);
         }
         if (this.mCharInfo.IsPlayer)
         {
             ((Sinbad)this.mMesh).EndJump();
         }
     }
 }
Example #3
0
        public void teleport(Vector3 loc)
        {
            this.MovementInfo.ClearInfo();
            GravitySpeed.Reset();
            this.MovementInfo.IsFalling = false;
            this.MovementInfo.IsJumping = false;
            this.MovementInfo.IsPushedByArcaneLevitator = false;
            this.MovementInfo.IsMovementForced          = false;
            this.mPreviousDirection = Vector3.ZERO;
            this.mForcedDestination.Clear();
            this.WaitForRemove = false;

            Vector3 prevBlockPos = this.BlockPosition;

            this.FeetPosition = loc;
            Vector3 actBlockPos = this.BlockPosition;

            if (prevBlockPos != actBlockPos)
            {
                this.mCharacMgr.World.onBlockLeave(prevBlockPos, this);
                this.mCharacMgr.World.onBlockEnter(actBlockPos, this);
            }
        }