mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
patch DreamWorldController.ExtinguishDreamRaft since we want to prevent _lastUsedRaftProjector from being null (since we dont actually extinguish the raft)
This commit is contained in:
parent
5b18f682d6
commit
344ccbc1e0
@ -62,17 +62,21 @@ public class DreamRaftPatches : QSBPatch
|
|||||||
/// and we don't want it to extinguish with other players on it.
|
/// and we don't want it to extinguish with other players on it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(DreamRaftProjector), nameof(DreamRaftProjector.ExtinguishImmediately))]
|
[HarmonyPatch(typeof(DreamWorldController), nameof(DreamWorldController.ExtinguishDreamRaft))]
|
||||||
private static bool ExtinguishImmediately(DreamRaftProjector __instance)
|
private static bool ExtinguishDreamRaft(DreamWorldController __instance)
|
||||||
{
|
{
|
||||||
if (!QSBWorldSync.AllObjectsReady)
|
if (!QSBWorldSync.AllObjectsReady)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// still release authority over the raft tho
|
if (__instance._lastUsedRaftProjector)
|
||||||
__instance._dreamRaftProjection.GetComponent<DreamRaftController>().GetWorldObject<QSBDreamRaft>()
|
{
|
||||||
.NetworkBehaviour.netIdentity.UpdateAuthQueue(AuthQueueAction.Remove);
|
// still release authority over the raft tho
|
||||||
|
__instance._lastUsedRaftProjector
|
||||||
|
._dreamRaftProjection.GetComponent<DreamRaftController>().GetWorldObject<QSBDreamRaft>()
|
||||||
|
.NetworkBehaviour.netIdentity.UpdateAuthQueue(AuthQueueAction.Remove);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user