- removed STAT_INVENTORY.

This was causing issues with sprite sorting. For this to work as intended, all actors in the world that display sprites need to remain in spawn order, including inventory items.
The only thing this statnum was used for were some bot related search actions which are simply not worth breaking actual maps for some very minor performance gain.
This commit is contained in:
Christoph Oelckers 2016-08-20 19:10:14 +02:00
parent ca8ef7f3f3
commit 5ff0abe568
4 changed files with 3 additions and 4 deletions

View file

@ -259,7 +259,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
r = pr_botmove();
if (r < 128)
{
TThinkerIterator<AInventory> it (STAT_INVENTORY, bglobal.firstthing);
TThinkerIterator<AInventory> it (MAX_STATNUM+1, bglobal.firstthing);
AInventory *item = it.Next();
if (item != NULL || (item = it.Next()) != NULL)

View file

@ -1280,7 +1280,7 @@ void G_FinishTravel ()
for (inv = pawn->Inventory; inv != NULL; inv = inv->Inventory)
{
inv->ChangeStatNum (STAT_INVENTORY);
inv->ChangeStatNum (STAT_DEFAULT);
inv->LinkToWorld ();
inv->Travelled ();
}

View file

@ -572,7 +572,6 @@ bool AInventory::ShouldRespawn ()
void AInventory::BeginPlay ()
{
Super::BeginPlay ();
ChangeStatNum (STAT_INVENTORY);
flags |= MF_DROPPED; // [RH] Items are dropped by default
}

View file

@ -53,7 +53,7 @@ enum
STAT_BOSSTARGET, // A boss brain target
STAT_LIGHTNING, // The lightning thinker
STAT_DECALTHINKER, // An object that thinks for a decal
STAT_INVENTORY, // An inventory item
UNUSED_STAT_INVENTORY, // An inventory item (value kept for savegame compatibility.)
STAT_LIGHT, // A sector light effect
STAT_LIGHTTRANSFER, // A sector light transfer. These must be ticked after the light effects!!!
STAT_EARTHQUAKE, // Earthquake actors