示例#1
0
        public void SetGClimbingLedge(ClimbingLedge ledge)
        {
            int ai = Process.Alloc(4).ToInt32();

            Process.Write(ai, humanAI.Address);

            Process.THISCALL <NullReturnCall>(0x8D44E0, 0x512310, (IntArg)ai);
            if (Process.THISCALL <BoolArg>(0x8D44E0, 0x5123E0, (IntArg)ai))
            {
                var li = Process.THISCALL <zTLedgeInfo>(0x8D44E0, 0x512310, (IntArg)ai);
                ledge.SetLedgeInfo(li);
            }
            else
            {
                throw new Exception("SetGClimbingLedge: GetDataDangerous failed!");
            }
        }
示例#2
0
        public ClimbingLedge DetectClimbingLedge()
        {
            ClimbingLedge result;

            using (var dummy = zVec3.Create())
                humanAI.DetectClimbUpLedge(dummy, true);

            var li = humanAI.GetLedgeInfo();

            if (li.Address != 0)
            {
                result = new ClimbingLedge(li);
            }
            else
            {
                result = null;
            }
            humanAI.ClearFoundLedge();

            return(result);
        }