- added a new sector list to AActor that collects all portal-linked sectors the actor's center is in. (Inspired by Eternity's solution to the same problem.)

This is for rendering the sprite properly in all areas the actor touches. The original thinglist is not sufficient for this and Boom's touching thinglist has other purposes and collects too much data.
This new list will only get filled in when the actor is actually crossing a portal plane, for the normal sector thinglist will still be used.
This piggybacks on the msecnode_t code which has been extended to be able to handle more than one list by passing the sector's membert pointers as parameters.
This commit is contained in:
Christoph Oelckers 2016-04-17 23:48:04 +02:00
parent f66202aef1
commit 54d78df267
8 changed files with 96 additions and 21 deletions

View file

@ -3752,6 +3752,9 @@ void AActor::Tick ()
if (!CheckNoDelay())
return; // freed itself
// cycle through states, calling action functions at transitions
UpdateRenderSectorList();
if (tics != -1)
{
// [RH] Use tics <= 0 instead of == 0 so that spawnstates
@ -4011,6 +4014,7 @@ AActor *AActor::StaticSpawn (PClassActor *type, const DVector3 &pos, replace_t a
}
actor->SetXYZ(pos);
actor->OldRenderPos = { FLT_MAX, FLT_MAX, FLT_MAX };
actor->picnum.SetInvalid();
actor->health = actor->SpawnHealth();
@ -4322,12 +4326,15 @@ void AActor::Deactivate (AActor *activator)
}
}
//
// P_RemoveMobj
//
void AActor::Destroy ()
{
ClearRenderSectorList();
// [RH] Destroy any inventory this actor is carrying
DestroyAllInventory ();