Remove RobustTree & PVSCollection (#4759)

* Cut down RobustTree

* Better LoD

* Add PvsPriority flag

* Undo cvar name change

* reorganize grafana metrics

* Fix tests

* Fix replays

* Don't try process empty chunks

* Fix move benchmark

* Fix benchmark

* Remove obsolete audio methods

* Moar benchmarks

* Rename EntityData

* A

* B
This commit is contained in:
Leon Friedrich
2023-12-28 09:10:13 +11:00
committed by GitHub
parent ced6d5a8b0
commit eba58cb893
64 changed files with 2373 additions and 2621 deletions
@@ -44,13 +44,12 @@ public abstract partial class SharedTransformSystem
SetGridId(uid, xform, newGridUid, xformQuery);
var reParent = new EntParentChangedMessage(uid, oldGridUid, xform.MapID, xform);
RaiseLocalEvent(uid, ref reParent, true);
// TODO: Ideally shouldn't need to call the moveevent
var movEevee = new MoveEvent(uid,
var meta = MetaData(uid);
var movEevee = new MoveEvent((uid, xform, meta),
new EntityCoordinates(oldGridUid, xform._localPosition),
new EntityCoordinates(newGridUid, xform._localPosition),
xform.LocalRotation,
xform.LocalRotation,
xform,
_gameTiming.ApplyingState);
RaiseLocalEvent(uid, ref movEevee);
InvokeGlobalMoveEvent(ref movEevee);
@@ -58,7 +57,7 @@ public abstract partial class SharedTransformSystem
DebugTools.Assert(xformQuery.GetComponent(oldGridUid).MapID == xformQuery.GetComponent(newGridUid).MapID);
DebugTools.Assert(xform._anchored);
Dirty(uid, xform);
Dirty(uid, xform, meta);
var ev = new ReAnchorEvent(uid, oldGridUid, newGridUid, tilePos, xform);
RaiseLocalEvent(uid, ref ev);
}
@@ -598,7 +597,7 @@ public abstract partial class SharedTransformSystem
if (xform.ParentUid == xform.MapUid)
DebugTools.Assert(xform.GridUid == null || xform.GridUid == uid || xform.GridUid == xform.MapUid);
#endif
var moveEvent = new MoveEvent(uid, oldPosition, newPosition, oldRotation, xform._localRotation, xform, _gameTiming.ApplyingState);
var moveEvent = new MoveEvent((uid, xform, meta), oldPosition, newPosition, oldRotation, xform._localRotation, _gameTiming.ApplyingState);
RaiseLocalEvent(uid, ref moveEvent);
InvokeGlobalMoveEvent(ref moveEvent);
}
@@ -1142,13 +1141,14 @@ public abstract partial class SharedTransformSystem
DebugTools.Assert(!xform.NoLocalRotation || xform.LocalRotation == 0);
Dirty(uid, xform);
var meta = MetaData(uid);
Dirty(uid, xform, meta);
xform.MatricesDirty = true;
if (!xform.Initialized)
return;
var moveEvent = new MoveEvent(uid, oldPosition, xform.Coordinates, oldRotation, rot, xform, _gameTiming.ApplyingState);
var moveEvent = new MoveEvent((uid, xform, meta), oldPosition, xform.Coordinates, oldRotation, rot, _gameTiming.ApplyingState);
RaiseLocalEvent(uid, ref moveEvent);
InvokeGlobalMoveEvent(ref moveEvent);
}