mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 06:42:25 +02:00
Audio and other misc replay related changes (#3471)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Robust.Shared.Enums;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -255,5 +256,17 @@ namespace Robust.Client.Player
|
||||
|
||||
PlayerListUpdated?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public bool TryGetSessionByEntity(EntityUid uid, [NotNullWhen(true)] out ICommonSession? session)
|
||||
{
|
||||
if (LocalPlayer?.ControlledEntity == uid)
|
||||
{
|
||||
session = LocalPlayer.Session;
|
||||
return true;
|
||||
}
|
||||
|
||||
session = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user