fix enter/exit dreamworld

This commit is contained in:
Mister_Nebula 2022-05-27 05:39:12 +01:00
parent 0f99ae1dbb
commit 8733e9f758
2 changed files with 4 additions and 10 deletions

View File

@ -35,14 +35,11 @@ internal class EnterDreamWorldMessage : QSBWorldObjectMessage<QSBDreamLanternIte
player.InDreamWorld = true; player.InDreamWorld = true;
player.AssignedSimulationLantern = WorldObject; player.AssignedSimulationLantern = WorldObject;
if (QSBCore.IsHost)
{
foreach (var ghost in QSBWorldSync.GetWorldObjects<QSBGhostBrain>()) foreach (var ghost in QSBWorldSync.GetWorldObjects<QSBGhostBrain>())
{ {
ghost.OnEnterDreamWorld(player); ghost.OnEnterDreamWorld(player);
} }
} }
}
public override void OnReceiveRemote() public override void OnReceiveRemote()
{ {

View File

@ -30,14 +30,11 @@ internal class ExitDreamWorldMessage : QSBMessage
player.InDreamWorld = false; player.InDreamWorld = false;
player.AssignedSimulationLantern = null; player.AssignedSimulationLantern = null;
if (QSBCore.IsHost)
{
foreach (var ghost in QSBWorldSync.GetWorldObjects<QSBGhostBrain>()) foreach (var ghost in QSBWorldSync.GetWorldObjects<QSBGhostBrain>())
{ {
ghost.OnExitDreamWorld(player); ghost.OnExitDreamWorld(player);
} }
} }
}
public override void OnReceiveRemote() public override void OnReceiveRemote()
{ {