Example #1
0
        internal void TryClimb(ClimbMoves move, WorldObjects.NPC.ClimbingLedge ledge)
        {
            if (Host.IsDead || Host.Environment.InAir)
            {
                return;
            }

            if (Host.ModelInst.IsInAnimation())
            {
                return;
            }

            if (!jumpLockTimer.IsReady) // don't spam
            {
                return;
            }

            Host.DoClimb(move, ledge);
        }
Example #2
0
        public void DoClimb(ClimbMoves move, WorldObjects.NPC.ClimbingLedge ledge)
        {
            ScriptAniJob job;

            switch (move)
            {
            case ClimbMoves.High:
                job = AniCatalog.Climbs.High;
                break;

            case ClimbMoves.Mid:
                job = AniCatalog.Climbs.Mid;
                break;

            case ClimbMoves.Low:
                job = AniCatalog.Climbs.Low;
                break;

            default:
                Logger.Log("Not existing climb move: " + move);
                return;
            }

            if (job == null)
            {
                return;
            }


            var stream = this.BaseInst.GetScriptVobStream();

            stream.Write((byte)ScriptVobMessageIDs.Climb);
            ledge.WriteStream(stream);
            this.BaseInst.SendScriptVobStream(stream);

            this.isClimbing = true;
            this.ModelInst.StartAniJob(job, () => this.isClimbing = false);
        }
Example #3
0
 public void ClimbLedge(AIAgent aiAgent, WorldObjects.NPC.ClimbingLedge ledge)
 {
     throw new NotImplementedException();
 }