- fixed sprite sorting in the hardware renderer.
This did no longer sort sprites in the same position reliably since the feature to render sprites which only partially are inside a sector was added. With this, sprites in the same position are no longer guaranteed to be added to the render list in sequence. Fixed by adding an 'order' field to AActor which gets incremented with each spawned actor and reset when a new level is started. The software renderer will also need a variation of this fix but its data no longer has access to the defining actor when being sorted, so a bit more work is needed here.
This commit is contained in:
parent
0c4602507e
commit
c58f5095d9
7 changed files with 10 additions and 2 deletions
|
|
@ -362,6 +362,7 @@ void AActor::Serialize(FSerializer &arc)
|
|||
A("renderrequired", RenderRequired)
|
||||
A("friendlyseeblocks", friendlyseeblocks)
|
||||
A("spawntime", SpawnTime)
|
||||
A("spawnorder", SpawnOrder)
|
||||
A("friction", Friction);
|
||||
}
|
||||
|
||||
|
|
@ -4409,6 +4410,7 @@ AActor *AActor::StaticSpawn (PClassActor *type, const DVector3 &pos, replace_t a
|
|||
|
||||
actor = static_cast<AActor *>(const_cast<PClassActor *>(type)->CreateNew ());
|
||||
actor->SpawnTime = level.totaltime;
|
||||
actor->SpawnOrder = level.spawnindex++;
|
||||
|
||||
// Set default dialogue
|
||||
actor->ConversationRoot = GetConversation(actor->GetClass()->TypeName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue