mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-04 02:47:22 +00:00
16 lines
392 B
C#
16 lines
392 B
C#
using QSB.Player;
|
|
using QSB.TransformSync;
|
|
using QuantumUNET;
|
|
|
|
namespace QSB.Utility
|
|
{
|
|
public static class UnetExtensions
|
|
{
|
|
public static PlayerInfo GetPlayer(this QNetworkConnection connection)
|
|
{
|
|
var go = connection.PlayerControllers[0].Gameobject;
|
|
var controller = go.GetComponent<PlayerTransformSync>();
|
|
return QSBPlayerManager.GetPlayer(controller.NetId.Value);
|
|
}
|
|
}
|
|
} |