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

Function M_SyncStartKill

Source/monster.cpp:1760–1783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1758}
1759
1760void M_SyncStartKill(int i, int x, int y, int pnum)
1761{
1762 if ((DWORD)i >= MAXMONSTERS)
1763 app_fatal("M_SyncStartKill: Invalid monster %d", i);
1764
1765 if (monster[i]._mhitpoints == 0 || monster[i]._mmode == MM_DEATH) {
1766 return;
1767 }
1768
1769 if (dMonster[x][y] == 0) {
1770 M_ClearSquares(i);
1771 monster[i]._mx = x;
1772 monster[i]._my = y;
1773 monster[i]._moldx = x;
1774 monster[i]._moldy = y;
1775 }
1776
1777 if (monster[i]._mmode == MM_STONE) {
1778 MonstStartKill(i, pnum, FALSE);
1779 monster[i]._mmode = MM_STONE;
1780 } else {
1781 MonstStartKill(i, pnum, FALSE);
1782 }
1783}
1784
1785void M_StartFadein(int i, int md, BOOL backwards)
1786{

Callers 2

On_MONSTDEATHFunction · 0.85
On_KILLGOLEMFunction · 0.85

Calls 3

app_fatalFunction · 0.85
M_ClearSquaresFunction · 0.85
MonstStartKillFunction · 0.85

Tested by

no test coverage detected