mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 06:35:45 +00:00
player id hack
This commit is contained in:
parent
991e4bd33e
commit
d88be7bc5f
@ -72,7 +72,8 @@ namespace QSB.Events
|
||||
|
||||
private void OnClientReceive(T message)
|
||||
{
|
||||
if (message.SenderId == PlayerTransformSync.LocalInstance?.netId.Value)
|
||||
if (message.SenderId == PlayerTransformSync.LocalInstance?.netId.Value ||
|
||||
PlayerRegistry.GetTransformSync(message.SenderId).PlayerId == PlayerTransformSync.LocalInstance?.netId.Value)
|
||||
{
|
||||
OnReceiveLocal(message);
|
||||
return;
|
||||
|
@ -13,7 +13,7 @@ namespace QSB.TransformSync
|
||||
LocalInstance = this;
|
||||
}
|
||||
|
||||
protected override uint PlayerId => netId.Value - 2;
|
||||
public override uint PlayerId => netId.Value - 2;
|
||||
|
||||
protected override Transform InitLocalTransform()
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace QSB.TransformSync
|
||||
LocalInstance = this;
|
||||
}
|
||||
|
||||
protected override uint PlayerId => netId.Value - 3;
|
||||
public override uint PlayerId => netId.Value - 3;
|
||||
|
||||
private Transform GetProbe()
|
||||
{
|
||||
|
@ -1,8 +1,6 @@
|
||||
using QSB.Events;
|
||||
using QSB.Messaging;
|
||||
using QSB.Utility;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
{
|
||||
@ -43,6 +41,6 @@ namespace QSB.TransformSync
|
||||
transformSync.SectorName = message.SectorName;
|
||||
}
|
||||
|
||||
public override void OnReceiveLocal(SectorMessage message) => OnReceiveRemote(message);
|
||||
//public override void OnReceiveLocal(SectorMessage message) => OnReceiveRemote(message);
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ namespace QSB.TransformSync
|
||||
LocalInstance = this;
|
||||
}
|
||||
|
||||
protected override uint PlayerId => netId.Value - 0;
|
||||
public override uint PlayerId => netId.Value - 0;
|
||||
|
||||
private Transform GetPlayerModel()
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ namespace QSB.TransformSync
|
||||
LocalInstance = this;
|
||||
}
|
||||
|
||||
protected override uint PlayerId => netId.Value - 1;
|
||||
public override uint PlayerId => netId.Value - 1;
|
||||
|
||||
private Transform GetShipModel()
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ namespace QSB.TransformSync
|
||||
protected abstract Transform InitLocalTransform();
|
||||
protected abstract Transform InitRemoteTransform();
|
||||
protected abstract bool IsReady { get; }
|
||||
protected abstract uint PlayerId { get; }
|
||||
public abstract uint PlayerId { get; }
|
||||
|
||||
protected void Init()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user