Content update for NetEntities (#18935)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user