mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-13 12:40:50 +00:00
added tool syncing
This commit is contained in:
parent
99064c4572
commit
83e8d9d714
@ -29,6 +29,7 @@ namespace QSB.Events
|
||||
|
||||
public override void OnReceiveLocal(ToggleMessage message)
|
||||
{
|
||||
PlayerRegistry.LocalPlayer.UpdateState(State.Flashlight, message.ToggleValue);
|
||||
PlayerRegistry.LocalPlayer.FlashLight.UpdateState(message.ToggleValue);
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ namespace QSB.Events
|
||||
|
||||
public override void OnReceiveLocal(ToggleMessage message)
|
||||
{
|
||||
PlayerRegistry.LocalPlayer.UpdateState(State.ProbeLauncher, message.ToggleValue);
|
||||
PlayerRegistry.LocalPlayer.ProbeLauncher.ChangeEquipState(message.ToggleValue);
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ namespace QSB.Events
|
||||
|
||||
public override void OnReceiveLocal(ToggleMessage message)
|
||||
{
|
||||
PlayerRegistry.LocalPlayer.UpdateState(State.Signalscope, message.ToggleValue);
|
||||
PlayerRegistry.LocalPlayer.Signalscope.ChangeEquipState(message.ToggleValue);
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ namespace QSB.Events
|
||||
|
||||
public override void OnReceiveLocal(ToggleMessage message)
|
||||
{
|
||||
PlayerRegistry.LocalPlayer.UpdateState(State.Translator, message.ToggleValue);
|
||||
PlayerRegistry.LocalPlayer.Translator.ChangeEquipState(message.ToggleValue);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ namespace QSB
|
||||
|
||||
public static PlayerInfo CreatePlayer(uint id)
|
||||
{
|
||||
DebugLog.ToConsole($"Creating player {id}");
|
||||
if (PlayerExists(id))
|
||||
{
|
||||
return null;
|
||||
|
@ -110,7 +110,7 @@ namespace QSB
|
||||
NetworkServer.SpawnWithClientAuthority(Instantiate(_cameraPrefab), connection);
|
||||
NetworkServer.SpawnWithClientAuthority(Instantiate(_probePrefab), connection);
|
||||
|
||||
var gameState = gameObject.AddComponent<Events.PlayerState>();
|
||||
gameObject.AddComponent<Events.PlayerState>();
|
||||
}
|
||||
|
||||
public override void OnClientConnect(NetworkConnection connection) // Called on the client when connecting to a server
|
||||
|
Loading…
x
Reference in New Issue
Block a user