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

Function M_StartWalk2

Source/monster.cpp:1306–1335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1304}
1305
1306void M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir)
1307{
1308 int fx = xadd + monster[i]._mx;
1309 int fy = yadd + monster[i]._my;
1310
1311 dMonster[monster[i]._mx][monster[i]._my] = -(i + 1);
1312 monster[i]._mVar1 = monster[i]._mx;
1313 monster[i]._mVar2 = monster[i]._my;
1314 monster[i]._moldx = monster[i]._mx;
1315 monster[i]._moldy = monster[i]._my;
1316 monster[i]._mx = fx;
1317 monster[i]._my = fy;
1318 monster[i]._mfutx = fx;
1319 monster[i]._mfuty = fy;
1320 dMonster[fx][fy] = i + 1;
1321 if (monster[i]._uniqtype != 0)
1322 ChangeLightXY(monster[i].mlid, monster[i]._mx, monster[i]._my);
1323 monster[i]._mxoff = xoff;
1324 monster[i]._myoff = yoff;
1325 monster[i]._mmode = MM_WALK2;
1326 monster[i]._mxvel = xvel;
1327 monster[i]._myvel = yvel;
1328 monster[i]._mVar3 = EndDir;
1329 monster[i]._mdir = EndDir;
1330 NewMonsterAnim(i, &monster[i].MType->Anims[MA_WALK], EndDir);
1331 monster[i]._mVar6 = 16 * xoff;
1332 monster[i]._mVar7 = 16 * yoff;
1333 monster[i]._mVar8 = 0;
1334 M_CheckEFlag(i);
1335}
1336
1337void M_StartWalk3(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int mapx, int mapy, int EndDir)
1338{

Callers 1

M_WalkDirFunction · 0.85

Calls 3

ChangeLightXYFunction · 0.85
NewMonsterAnimFunction · 0.85
M_CheckEFlagFunction · 0.85

Tested by

no test coverage detected