Revert "fix(render): Phase A8 — animated entities exempt from stencil-gated outdoor pass"
This reverts commit a2ad5c1ac4.
This commit is contained in:
parent
c897a179fa
commit
96f8bd2bd7
2 changed files with 10 additions and 87 deletions
|
|
@ -107,69 +107,4 @@ public class WbDrawDispatcherEntitySetTests
|
|||
Assert.Contains(0x10000002u, result);
|
||||
Assert.DoesNotContain(0x10000003u, result);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
// Phase A8 fix (post-visual-verification): animated entities (player,
|
||||
// NPCs, monsters) are live server-spawned objects with ParentCellId == null.
|
||||
// Without these tests, they would be classified as outdoor scenery and
|
||||
// stencil-gated by the OutdoorOnly pass — causing the character to
|
||||
// disappear when the camera enters a building. Fix: animatedEntityIds
|
||||
// overrides the ParentCellId-based partition. Animated entities always
|
||||
// belong in the IndoorOnly pass, never in OutdoorOnly.
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
[Fact]
|
||||
public void EntitySet_IndoorOnly_IncludesAnimatedEntitiesEvenWithNullParentCellId()
|
||||
{
|
||||
var entities = new List<WorldEntity>
|
||||
{
|
||||
Indoor(0x10000001, 0xA9B40143),
|
||||
Outdoor(0x10000002), // static outdoor scenery
|
||||
Outdoor(0x40000005), // animated (player/NPC)
|
||||
};
|
||||
|
||||
var visible = new HashSet<uint> { 0xA9B40143u };
|
||||
var animated = new HashSet<uint> { 0x40000005u };
|
||||
|
||||
var result = WbDrawDispatcher.WalkEntitiesForTest(
|
||||
entities,
|
||||
visibleCellIds: visible,
|
||||
set: WbDrawDispatcher.EntitySet.IndoorOnly,
|
||||
animatedEntityIds: animated);
|
||||
|
||||
// Indoor entity passes via ParentCellId.HasValue.
|
||||
// Outdoor scenery (0x10000002) fails — not animated, no ParentCellId.
|
||||
// Animated entity (0x40000005) passes via animatedEntityIds override.
|
||||
Assert.Equal(2, result.Count);
|
||||
Assert.Contains(0x10000001u, result);
|
||||
Assert.Contains(0x40000005u, result);
|
||||
Assert.DoesNotContain(0x10000002u, result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EntitySet_OutdoorOnly_ExcludesAnimatedEntities()
|
||||
{
|
||||
var entities = new List<WorldEntity>
|
||||
{
|
||||
Outdoor(0x10000002), // static outdoor scenery
|
||||
Outdoor(0x40000005), // animated (player/NPC)
|
||||
Outdoor(0x40000006), // animated (NPC)
|
||||
};
|
||||
|
||||
var animated = new HashSet<uint> { 0x40000005u, 0x40000006u };
|
||||
|
||||
var result = WbDrawDispatcher.WalkEntitiesForTest(
|
||||
entities,
|
||||
visibleCellIds: null,
|
||||
set: WbDrawDispatcher.EntitySet.OutdoorOnly,
|
||||
animatedEntityIds: animated);
|
||||
|
||||
// Only static outdoor scenery passes the OutdoorOnly partition.
|
||||
// Animated entities are explicitly excluded so they don't get
|
||||
// stencil-gated (they're drawn in the IndoorOnly pass instead).
|
||||
Assert.Single(result);
|
||||
Assert.Contains(0x10000002u, result);
|
||||
Assert.DoesNotContain(0x40000005u, result);
|
||||
Assert.DoesNotContain(0x40000006u, result);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue