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

Function M_StartWalk3

Source/monster.cpp:1337–1370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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{
1339 int fx = xadd + monster[i]._mx;
1340 int fy = yadd + monster[i]._my;
1341 int x = mapx + monster[i]._mx;
1342 int y = mapy + monster[i]._my;
1343
1344 if (monster[i]._uniqtype != 0)
1345 ChangeLightXY(monster[i].mlid, x, y);
1346
1347 dMonster[monster[i]._mx][monster[i]._my] = -(i + 1);
1348 dMonster[fx][fy] = -(i + 1);
1349 monster[i]._mVar4 = x;
1350 monster[i]._mVar5 = y;
1351 dFlags[x][y] |= BFLAG_MONSTLR;
1352 monster[i]._moldx = monster[i]._mx;
1353 monster[i]._moldy = monster[i]._my;
1354 monster[i]._mfutx = fx;
1355 monster[i]._mfuty = fy;
1356 monster[i]._mxoff = xoff;
1357 monster[i]._myoff = yoff;
1358 monster[i]._mmode = MM_WALK3;
1359 monster[i]._mxvel = xvel;
1360 monster[i]._myvel = yvel;
1361 monster[i]._mVar1 = fx;
1362 monster[i]._mVar2 = fy;
1363 monster[i]._mVar3 = EndDir;
1364 monster[i]._mdir = EndDir;
1365 NewMonsterAnim(i, &monster[i].MType->Anims[MA_WALK], EndDir);
1366 monster[i]._mVar6 = 16 * xoff;
1367 monster[i]._mVar7 = 16 * yoff;
1368 monster[i]._mVar8 = 0;
1369 M_CheckEFlag(i);
1370}
1371
1372void M_StartAttack(int i)
1373{

Callers 1

M_WalkDirFunction · 0.85

Calls 3

ChangeLightXYFunction · 0.85
NewMonsterAnimFunction · 0.85
M_CheckEFlagFunction · 0.85

Tested by

no test coverage detected