diff --git a/QSB/CampfireSync/WorldObjects/QSBCampfire.cs b/QSB/CampfireSync/WorldObjects/QSBCampfire.cs index 0bdb9bee..f06bba91 100644 --- a/QSB/CampfireSync/WorldObjects/QSBCampfire.cs +++ b/QSB/CampfireSync/WorldObjects/QSBCampfire.cs @@ -17,6 +17,9 @@ namespace QSB.CampfireSync.WorldObjects .GetMethod("StartRoasting", BindingFlags.NonPublic | BindingFlags.Instance) .Invoke(AttachedObject, null); + public Campfire.State GetState() + => AttachedObject.GetState(); + public void SetState(Campfire.State newState) => AttachedObject.SetState(newState); } diff --git a/QSB/Player/Events/PlayerStatesRequestEvent.cs b/QSB/Player/Events/PlayerStatesRequestEvent.cs index 78e8cb01..74fec7ee 100644 --- a/QSB/Player/Events/PlayerStatesRequestEvent.cs +++ b/QSB/Player/Events/PlayerStatesRequestEvent.cs @@ -1,4 +1,5 @@ using OWML.Utils; +using QSB.CampfireSync.WorldObjects; using QSB.Events; using QSB.Messaging; using QSB.QuantumSync; @@ -81,6 +82,11 @@ namespace QSB.Player.Events { QSBEventManager.FireEvent(EventNames.QSBQuantumAuthority, i, list[i].ControllingPlayer); } + + foreach (var campfire in QSBWorldSync.GetWorldObjects()) + { + QSBEventManager.FireEvent(EventNames.QSBCampfireState, campfire.ObjectId, campfire.GetState()); + } } } } \ No newline at end of file