.
This commit is contained in:
@@ -112,6 +112,7 @@
|
|||||||
<Compile Include="Patching\InteractableHostPatches.cs" />
|
<Compile Include="Patching\InteractableHostPatches.cs" />
|
||||||
<Compile Include="Patching\ObjectHealthPatches.cs" />
|
<Compile Include="Patching\ObjectHealthPatches.cs" />
|
||||||
<Compile Include="Patching\PlugPatches.cs" />
|
<Compile Include="Patching\PlugPatches.cs" />
|
||||||
|
<Compile Include="Patching\SceneManagerPatches.cs" />
|
||||||
<Compile Include="Patching\SkeletonHandPatches.cs" />
|
<Compile Include="Patching\SkeletonHandPatches.cs" />
|
||||||
<Compile Include="Patching\ZonePatches.cs" />
|
<Compile Include="Patching\ZonePatches.cs" />
|
||||||
<Compile Include="Sync\Components\SyncableAI.cs" />
|
<Compile Include="Sync\Components\SyncableAI.cs" />
|
||||||
|
|||||||
26
BoneSync/Patching/SceneManagerPatches.cs
Normal file
26
BoneSync/Patching/SceneManagerPatches.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using HarmonyLib;
|
||||||
|
using MelonLoader;
|
||||||
|
using StressLevelZero.Utilities;
|
||||||
|
|
||||||
|
namespace BoneSync.Patching
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(BoneworksSceneManager))]
|
||||||
|
internal class SceneManagerPatches
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(BoneworksSceneManager.LoadScene)), HarmonyPostfix]
|
||||||
|
private static void LoadScenePrefix(BoneworksSceneManager __instance, int sceneBuildIndex)
|
||||||
|
{
|
||||||
|
MelonLogger.Msg("LoadScenePrefix: " + sceneBuildIndex);
|
||||||
|
if (!BoneSync.IsConnected) return;
|
||||||
|
if (BoneSync.lobby.IsHost)
|
||||||
|
{
|
||||||
|
MelonLogger.Msg("Host is loading scene, sending message to clients...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user