mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-10 16:14:45 +00:00
fuck
This commit is contained in:
parent
98b9d4cc2e
commit
2a61d8cd36
@ -17,7 +17,7 @@ public abstract class AuthWorldObject<T> : WorldObject<T>, IAuthWorldObject
|
||||
public abstract bool CanOwn { get; }
|
||||
|
||||
public override void SendInitialState(uint to) =>
|
||||
((IAuthWorldObject)this).SendMessage(new WorldObjectAuthMessage(Owner) { To = to });
|
||||
((IAuthWorldObject)this).SendMessage(new AuthWorldObjectMessage(Owner) { To = to });
|
||||
|
||||
public override async UniTask Init(CancellationToken ct) =>
|
||||
QSBPlayerManager.OnRemovePlayer += OnPlayerLeave;
|
||||
|
@ -6,9 +6,9 @@ namespace QSB.AuthoritySync;
|
||||
/// <summary>
|
||||
/// request or release ownership of a world object
|
||||
/// </summary>
|
||||
public class WorldObjectAuthMessage : QSBWorldObjectMessage<IAuthWorldObject, uint>
|
||||
public class AuthWorldObjectMessage : QSBWorldObjectMessage<IAuthWorldObject, uint>
|
||||
{
|
||||
public WorldObjectAuthMessage(uint owner) : base(owner) { }
|
||||
public AuthWorldObjectMessage(uint owner) : base(owner) { }
|
||||
|
||||
public override bool ShouldReceive
|
||||
{
|
||||
@ -39,7 +39,7 @@ public class WorldObjectAuthMessage : QSBWorldObjectMessage<IAuthWorldObject, ui
|
||||
if (WorldObject.Owner == 0 && WorldObject.CanOwn)
|
||||
{
|
||||
// object has no owner, but is still active for this player. request ownership
|
||||
WorldObject.SendMessage(new WorldObjectAuthMessage(QSBPlayerManager.LocalPlayerId));
|
||||
WorldObject.SendMessage(new AuthWorldObjectMessage(QSBPlayerManager.LocalPlayerId));
|
||||
}
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ public static class IAuthWorldObject_Extensions
|
||||
{
|
||||
return;
|
||||
}
|
||||
authWorldObject.SendMessage(new WorldObjectAuthMessage(QSBPlayerManager.LocalPlayerId));
|
||||
authWorldObject.SendMessage(new AuthWorldObjectMessage(QSBPlayerManager.LocalPlayerId));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -31,6 +31,6 @@ public static class IAuthWorldObject_Extensions
|
||||
{
|
||||
return;
|
||||
}
|
||||
authWorldObject.SendMessage(new WorldObjectAuthMessage(QSBPlayerManager.LocalPlayerId));
|
||||
authWorldObject.SendMessage(new AuthWorldObjectMessage(QSBPlayerManager.LocalPlayerId));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user