MCPcopy Create free account
hub / github.com/diasurgical/devilution / M_PathWalk

Function M_PathWalk

Source/monster.cpp:2820–2839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2818}
2819
2820BOOL M_PathWalk(int i)
2821{
2822 char path[25];
2823 BOOL(*Check)
2824 (int, int, int);
2825
2826 if ((DWORD)i >= MAXMONSTERS)
2827 app_fatal("M_PathWalk: Invalid monster %d", i);
2828
2829 Check = PosOkMonst3;
2830 if (!(monster[i]._mFlags & MFLAG_CAN_OPEN_DOOR))
2831 Check = PosOkMonst;
2832
2833 if (FindPath(Check, i, monster[i]._mx, monster[i]._my, monster[i]._menemyx, monster[i]._menemyy, path)) {
2834 M_CallWalk(i, plr2monst[path[0]]); /* plr2monst is local */
2835 return TRUE;
2836 }
2837
2838 return FALSE;
2839}
2840
2841BOOL M_CallWalk2(int i, int md)
2842{

Callers 1

MAI_PathFunction · 0.85

Calls 3

app_fatalFunction · 0.85
FindPathFunction · 0.85
M_CallWalkFunction · 0.85

Tested by

no test coverage detected