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

Function InitLevelChange

Source/player.cpp:2009–2032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2007}
2008
2009void InitLevelChange(int pnum)
2010{
2011 RemovePlrMissiles(pnum);
2012 if (pnum == myplr && qtextflag) {
2013 qtextflag = FALSE;
2014 sfx_stop();
2015 }
2016
2017 RemovePlrFromMap(pnum);
2018 SetPlayerOld(pnum);
2019 if (pnum == myplr) {
2020 dPlayer[plr[myplr].WorldX][plr[myplr].WorldY] = myplr + 1;
2021 } else {
2022 plr[pnum]._pLvlVisited[plr[pnum].plrlevel] = TRUE;
2023 }
2024
2025 ClrPlrPath(pnum);
2026 plr[pnum].destAction = ACTION_NONE;
2027 plr[pnum]._pLvlChanging = TRUE;
2028
2029 if (pnum == myplr) {
2030 plr[pnum].pLvlLoad = 10;
2031 }
2032}
2033
2034#if defined(__clang__) || defined(__GNUC__)
2035__attribute__((no_sanitize("shift-base")))

Callers 3

StartNewLvlFunction · 0.85
RestartTownLvlFunction · 0.85
StartWarpLvlFunction · 0.85

Calls 5

RemovePlrMissilesFunction · 0.85
sfx_stopFunction · 0.85
RemovePlrFromMapFunction · 0.85
SetPlayerOldFunction · 0.85
ClrPlrPathFunction · 0.85

Tested by

no test coverage detected