Content update for NetEntities (#18935)

This commit is contained in:
metalgearsloth
2023-09-11 09:42:41 +10:00
committed by GitHub
parent 389c8d1a2c
commit 5a0fc68be2
526 changed files with 3058 additions and 2215 deletions

View File

@@ -61,9 +61,9 @@ namespace Content.Client.Popups
if (recordReplay && _replayRecording.IsRecording)
{
if (entity != null)
_replayRecording.RecordClientMessage(new PopupEntityEvent(message, type, entity.Value));
_replayRecording.RecordClientMessage(new PopupEntityEvent(message, type, GetNetEntity(entity.Value)));
else
_replayRecording.RecordClientMessage(new PopupCoordinatesEvent(message, type, coordinates));
_replayRecording.RecordClientMessage(new PopupCoordinatesEvent(message, type, GetNetCoordinates(coordinates)));
}
var label = new WorldPopupLabel(coordinates)
@@ -170,13 +170,15 @@ namespace Content.Client.Popups
private void OnPopupCoordinatesEvent(PopupCoordinatesEvent ev)
{
PopupMessage(ev.Message, ev.Type, ev.Coordinates, null, false);
PopupMessage(ev.Message, ev.Type, GetCoordinates(ev.Coordinates), null, false);
}
private void OnPopupEntityEvent(PopupEntityEvent ev)
{
if (TryComp(ev.Uid, out TransformComponent? transform))
PopupMessage(ev.Message, ev.Type, transform.Coordinates, ev.Uid, false);
var entity = GetEntity(ev.Uid);
if (TryComp(entity, out TransformComponent? transform))
PopupMessage(ev.Message, ev.Type, transform.Coordinates, entity, false);
}
private void OnRoundRestart(RoundRestartCleanupEvent ev)