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!"); } }
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); }