quantum-space-buddies/QSB/Utility/UnetExtensions.cs
Mister_Nebula c6c76cb395 C L E A N
2020-12-02 21:23:01 +00:00

17 lines
399 B
C#

using QSB.Player;
using QSB.QuantumUNET;
using QSB.TransformSync;
namespace QSB.Utility
{
public static class UnetExtensions
{
public static PlayerInfo GetPlayer(this QSBNetworkConnection connection)
{
var go = connection.PlayerControllers[0].gameObject;
var controller = go.GetComponent<PlayerTransformSync>();
return QSBPlayerManager.GetPlayer(controller.NetId.Value);
}
}
}