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

Function M_StartWalk

Source/monster.cpp:1282–1304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1280}
1281
1282void M_StartWalk(int i, int xvel, int yvel, int xadd, int yadd, int EndDir)
1283{
1284 int fx = xadd + monster[i]._mx;
1285 int fy = yadd + monster[i]._my;
1286
1287 dMonster[fx][fy] = -(i + 1);
1288 monster[i]._mmode = MM_WALK;
1289 monster[i]._moldx = monster[i]._mx;
1290 monster[i]._moldy = monster[i]._my;
1291 monster[i]._mfutx = fx;
1292 monster[i]._mfuty = fy;
1293 monster[i]._mxvel = xvel;
1294 monster[i]._myvel = yvel;
1295 monster[i]._mVar1 = xadd;
1296 monster[i]._mVar2 = yadd;
1297 monster[i]._mVar3 = EndDir;
1298 monster[i]._mdir = EndDir;
1299 NewMonsterAnim(i, &monster[i].MType->Anims[MA_WALK], EndDir);
1300 monster[i]._mVar6 = 0;
1301 monster[i]._mVar7 = 0;
1302 monster[i]._mVar8 = 0;
1303 M_CheckEFlag(i);
1304}
1305
1306void M_StartWalk2(int i, int xvel, int yvel, int xoff, int yoff, int xadd, int yadd, int EndDir)
1307{

Callers 1

M_WalkDirFunction · 0.85

Calls 2

NewMonsterAnimFunction · 0.85
M_CheckEFlagFunction · 0.85

Tested by

no test coverage detected