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

Function M_UpdateLeader

Source/monster.cpp:2507–2523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2505}
2506
2507void M_UpdateLeader(int i)
2508{
2509 int ma, j;
2510
2511 if ((DWORD)i >= MAXMONSTERS)
2512 app_fatal("M_UpdateLeader: Invalid monster %d", i);
2513
2514 for (j = 0; j < nummonsters; j++) {
2515 ma = monstactive[j];
2516 if (monster[ma].leaderflag == 1 && monster[ma].leader == i)
2517 monster[ma].leaderflag = 0;
2518 }
2519
2520 if (monster[i].leaderflag == 1) {
2521 monster[monster[i].leader].packsize--;
2522 }
2523}
2524
2525void DoEnding()
2526{

Callers 2

DeltaLoadLevelFunction · 0.85
M_DoDeathFunction · 0.85

Calls 1

app_fatalFunction · 0.85

Tested by

no test coverage detected