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

Function M_DoDelay

Source/monster.cpp:2657–2684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2655}
2656
2657BOOL M_DoDelay(int i)
2658{
2659 int mVar2;
2660 int oFrame;
2661
2662 if ((DWORD)i >= MAXMONSTERS)
2663 app_fatal("M_DoDelay: Invalid monster %d", i);
2664 if (monster[i].MType == NULL)
2665 app_fatal("M_DoDelay: Monster %d \"%s\" MType NULL", i, monster[i].mName);
2666
2667 monster[i]._mAnimData = monster[i].MType->Anims[MA_STAND].Data[M_GetDir(i)];
2668 if (monster[i]._mAi == AI_LAZURUS) {
2669 if (monster[i]._mVar2 > 8 || monster[i]._mVar2 < 0)
2670 monster[i]._mVar2 = 8;
2671 }
2672
2673 mVar2 = monster[i]._mVar2;
2674 monster[i]._mVar2--;
2675
2676 if (!mVar2) {
2677 oFrame = monster[i]._mAnimFrame;
2678 M_StartStand(i, monster[i]._mdir);
2679 monster[i]._mAnimFrame = oFrame;
2680 return TRUE;
2681 }
2682
2683 return FALSE;
2684}
2685
2686BOOL M_DoStone(int i)
2687{

Callers 1

ProcessMonstersFunction · 0.85

Calls 3

app_fatalFunction · 0.85
M_GetDirFunction · 0.85
M_StartStandFunction · 0.85

Tested by

no test coverage detected