mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-06 01:00:16 +00:00
disable time sync when past certain eye state
This commit is contained in:
parent
e8803ac6c8
commit
2eda59044d
@ -1,7 +1,7 @@
|
||||
using QSB.Menus;
|
||||
using QSB.Messaging;
|
||||
using QSB.Messaging;
|
||||
using QSB.Player;
|
||||
using QSB.Player.TransformSync;
|
||||
using QSB.TimeSync;
|
||||
using QSB.WorldSync;
|
||||
|
||||
namespace QSB.EyeOfTheUniverse.EyeStateSync.Messages
|
||||
@ -26,12 +26,22 @@ namespace QSB.EyeOfTheUniverse.EyeStateSync.Messages
|
||||
public override void OnReceiveLocal()
|
||||
{
|
||||
QSBPlayerManager.LocalPlayer.EyeState = Value;
|
||||
|
||||
if (Value >= EyeState.ForestIsDark)
|
||||
{
|
||||
WakeUpSync.LocalInstance.enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnReceiveRemote()
|
||||
{
|
||||
var player = QSBPlayerManager.GetPlayer(From);
|
||||
player.EyeState = Value;
|
||||
|
||||
if (Value >= EyeState.ForestIsDark)
|
||||
{
|
||||
WakeUpSync.LocalInstance.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user