- split P_SetupLevel so that the main part of it can be made part of the MapLoader class.
- allocate BlockNodes from the same memory arena as SecNodes.
This commit is contained in:
parent
a47287f1e4
commit
467c73b2d7
5 changed files with 348 additions and 472 deletions
|
|
@ -565,41 +565,7 @@ void AActor::SetOrigin(double x, double y, double z, bool moving)
|
|||
if (!moving) ClearInterpolation();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// FBlockNode - allows to link actors into multiple blocks in the blockmap
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
FBlockNode *FBlockNode::FreeBlocks = NULL;
|
||||
|
||||
FBlockNode *FBlockNode::Create (AActor *who, int x, int y, int group)
|
||||
{
|
||||
FBlockNode *block;
|
||||
|
||||
if (FreeBlocks != NULL)
|
||||
{
|
||||
block = FreeBlocks;
|
||||
FreeBlocks = block->NextBlock;
|
||||
}
|
||||
else
|
||||
{
|
||||
block = new FBlockNode;
|
||||
}
|
||||
block->BlockIndex = x + y*level.blockmap.bmapwidth;
|
||||
block->Me = who;
|
||||
block->NextActor = NULL;
|
||||
block->PrevActor = NULL;
|
||||
block->PrevBlock = NULL;
|
||||
block->NextBlock = NULL;
|
||||
return block;
|
||||
}
|
||||
|
||||
void FBlockNode::Release ()
|
||||
{
|
||||
NextBlock = FreeBlocks;
|
||||
FreeBlocks = this;
|
||||
}
|
||||
|
||||
//
|
||||
// BLOCK MAP ITERATORS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue