- split polyobject init into its own file and cleaned things up a bit.
This commit is contained in:
parent
9de2f5c1e7
commit
11e9cdae33
7 changed files with 429 additions and 402 deletions
|
|
@ -80,8 +80,6 @@ extern unsigned int R_OldBlend;
|
|||
|
||||
static void P_Shutdown ();
|
||||
|
||||
extern polyblock_t **PolyBlockMap;
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// P_PrecacheLevel
|
||||
|
|
@ -279,21 +277,17 @@ void P_FreeLevelData ()
|
|||
level.blockmap.Clear();
|
||||
level.Polyobjects.Clear();
|
||||
|
||||
if (PolyBlockMap != nullptr)
|
||||
for(auto &pb : level.PolyBlockMap)
|
||||
{
|
||||
for (int i = level.blockmap.bmapwidth*level.blockmap.bmapheight-1; i >= 0; --i)
|
||||
polyblock_t *link = pb;
|
||||
while (link != nullptr)
|
||||
{
|
||||
polyblock_t *link = PolyBlockMap[i];
|
||||
while (link != nullptr)
|
||||
{
|
||||
polyblock_t *next = link->next;
|
||||
delete link;
|
||||
link = next;
|
||||
}
|
||||
polyblock_t *next = link->next;
|
||||
delete link;
|
||||
link = next;
|
||||
}
|
||||
delete[] PolyBlockMap;
|
||||
PolyBlockMap = nullptr;
|
||||
}
|
||||
level.PolyBlockMap.Reset();
|
||||
|
||||
level.deathmatchstarts.Clear();
|
||||
level.AllPlayerStarts.Clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue