fix(interaction): restore retail loot placement and world-drop projection
This commit is contained in:
parent
4d095be286
commit
921712f412
24 changed files with 1581 additions and 34 deletions
|
|
@ -3,7 +3,9 @@ using System.Reflection;
|
|||
using AcDream.App.Physics;
|
||||
using AcDream.App.Rendering;
|
||||
using AcDream.App.World;
|
||||
using AcDream.Core.Net;
|
||||
using AcDream.Core.Physics;
|
||||
using AcDream.Core.World;
|
||||
|
||||
namespace AcDream.App.Tests.World;
|
||||
|
||||
|
|
@ -65,6 +67,42 @@ public sealed class GameWindowLiveEntityCompositionTests
|
|||
BindingFlags.NonPublic));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RetainedButWithdrawnWorldEntity_RequiresPositionProjectionRecovery()
|
||||
{
|
||||
LiveEntityRecord record =
|
||||
LiveEntityTestFixture.CreateExactProjectionRecord(
|
||||
new WorldSession.EntitySpawn(
|
||||
Guid: 0x7000_00D0u,
|
||||
Position: null,
|
||||
SetupTableId: null,
|
||||
AnimPartChanges: [],
|
||||
TextureChanges: [],
|
||||
SubPalettes: [],
|
||||
BasePaletteId: null,
|
||||
ObjScale: null,
|
||||
Name: null,
|
||||
ItemType: null,
|
||||
MotionState: null,
|
||||
MotionTableId: null,
|
||||
InstanceSequence: 1));
|
||||
record.WorldEntity = new WorldEntity
|
||||
{
|
||||
Id = record.LocalEntityId!.Value,
|
||||
ServerGuid = record.ServerGuid,
|
||||
SourceGfxObjOrSetupId = 0x0200_0001u,
|
||||
Position = System.Numerics.Vector3.Zero,
|
||||
Rotation = System.Numerics.Quaternion.Identity,
|
||||
MeshRefs = [],
|
||||
};
|
||||
Assert.NotNull(record.WorldEntity);
|
||||
Assert.False(record.IsSpatiallyProjected);
|
||||
|
||||
Assert.True(
|
||||
LiveEntityNetworkUpdateController
|
||||
.RequiresSpatialProjectionRecovery(record));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(typeof(LiveEntityCollisionBuilder))]
|
||||
[InlineData(typeof(LiveEntityDefaultPoseResolver))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue