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

Function M_DoWalk2

Source/monster.cpp:1934–1963  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1932}
1933
1934BOOL M_DoWalk2(int i)
1935{
1936 BOOL rv;
1937
1938 if ((DWORD)i >= MAXMONSTERS)
1939 app_fatal("M_DoWalk2: Invalid monster %d", i);
1940 if (monster[i].MType == NULL)
1941 app_fatal("M_DoWalk2: Monster %d \"%s\" MType NULL", i, monster[i].mName);
1942
1943 if (monster[i]._mVar8 == monster[i].MType->Anims[MA_WALK].Frames) {
1944 dMonster[monster[i]._mVar1][monster[i]._mVar2] = 0;
1945 if (monster[i]._uniqtype != 0)
1946 ChangeLightXY(monster[i].mlid, monster[i]._mx, monster[i]._my);
1947 M_StartStand(i, monster[i]._mdir);
1948 rv = TRUE;
1949 } else {
1950 if (!monster[i]._mAnimCnt) {
1951 monster[i]._mVar8++;
1952 monster[i]._mVar6 += monster[i]._mxvel;
1953 monster[i]._mVar7 += monster[i]._myvel;
1954 monster[i]._mxoff = monster[i]._mVar6 >> 4;
1955 monster[i]._myoff = monster[i]._mVar7 >> 4;
1956 }
1957 rv = FALSE;
1958 }
1959 if (monster[i]._uniqtype != 0)
1960 M_ChangeLightOffset(i);
1961
1962 return rv;
1963}
1964
1965BOOL M_DoWalk3(int i)
1966{

Callers 1

ProcessMonstersFunction · 0.85

Calls 4

app_fatalFunction · 0.85
ChangeLightXYFunction · 0.85
M_StartStandFunction · 0.85
M_ChangeLightOffsetFunction · 0.85

Tested by

no test coverage detected