- moved main polyobject array into FLevelLocals and simplified the setup process to not depend on P_SpawnMapThing.
Since the SpawnedThings array is still available when polyobjects are spawned it makes no sense to create an expensive linked list in P_SpawnMapThing. This can be done far better by scanning through the array again and collect all matching items in a second array.
This commit is contained in:
parent
84a28454dc
commit
64595abe60
12 changed files with 72 additions and 126 deletions
|
|
@ -5251,17 +5251,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
case SMT_PolySpawn:
|
||||
case SMT_PolySpawnCrush:
|
||||
case SMT_PolySpawnHurt:
|
||||
{
|
||||
polyspawns_t *polyspawn = new polyspawns_t;
|
||||
polyspawn->next = polyspawns;
|
||||
polyspawn->pos = mthing->pos;
|
||||
polyspawn->angle = mthing->angle;
|
||||
polyspawn->type = mentry->Special;
|
||||
polyspawns = polyspawn;
|
||||
if (mentry->Special != SMT_PolyAnchor)
|
||||
po_NumPolyobjs++;
|
||||
return NULL;
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
case SMT_Player1Start:
|
||||
case SMT_Player2Start:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue