make QSBEyeProxyQuantumMoon match QSBQuantumMoon

This commit is contained in:
JohnCorby 2021-12-19 14:35:45 -08:00
parent b918b62663
commit dc66aa7375
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,5 @@
using QSB.Player; using QSB.Player;
using System.Linq;
namespace QSB.QuantumSync.WorldObjects namespace QSB.QuantumSync.WorldObjects
{ {
@ -6,7 +7,8 @@ namespace QSB.QuantumSync.WorldObjects
{ {
public override void Init() public override void Init()
{ {
ControllingPlayer = QSBPlayerManager.LocalPlayerId; // smallest player id is the host
ControllingPlayer = QSBPlayerManager.PlayerList.Min(x => x.PlayerId);
base.Init(); base.Init();
} }
} }

View File

@ -7,9 +7,8 @@ namespace QSB.QuantumSync.WorldObjects
{ {
public override void Init() public override void Init()
{ {
ControllingPlayer = QSBCore.IsHost // smallest player id is the host
? QSBPlayerManager.LocalPlayerId ControllingPlayer = QSBPlayerManager.PlayerList.Min(x => x.PlayerId);
: QSBPlayerManager.PlayerList.OrderBy(x => x.PlayerId).First().PlayerId;
base.Init(); base.Init();
} }
} }