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

Function RemovePlrFromMap

Source/player.cpp:1604–1622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1602}
1603
1604void RemovePlrFromMap(int pnum)
1605{
1606 int x, y;
1607 int pp, pn;
1608
1609 pp = pnum + 1;
1610 pn = -(pnum + 1);
1611
1612 for (y = 1; y < MAXDUNY; y++)
1613 for (x = 1; x < MAXDUNX; x++)
1614 if (dPlayer[x][y - 1] == pn || dPlayer[x - 1][y] == pn)
1615 if (dFlags[x][y] & BFLAG_PLAYERLR)
1616 dFlags[x][y] &= ~BFLAG_PLAYERLR;
1617
1618 for (y = 0; y < MAXDUNY; y++)
1619 for (x = 0; x < MAXDUNX; x++)
1620 if (dPlayer[x][y] == pp || dPlayer[x][y] == pn)
1621 dPlayer[x][y] = 0;
1622}
1623
1624void StartPlrHit(int pnum, int dam, BOOL forcehit)
1625{

Callers 3

multi_player_left_msgFunction · 0.85
StartPlayerKillFunction · 0.85
InitLevelChangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected