More Networking stuff
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HarmonyLib;
|
||||
@@ -11,31 +12,31 @@ using UnityEngine;
|
||||
|
||||
namespace BoneSync.Patching
|
||||
{
|
||||
/*
|
||||
|
||||
[HarmonyPatch(typeof(Pool))]
|
||||
internal class PoolPatches
|
||||
{
|
||||
|
||||
[HarmonyPatch(nameof(Pool.Spawn))]
|
||||
[HarmonyPostfix]
|
||||
private static void SpawnPatch(Pool __instance, ref GameObject __result)
|
||||
private static void SpawnPatchPost(Pool __instance, ref GameObject __result)
|
||||
{
|
||||
MelonLogger.Msg("Spawned object: " + __result.name);
|
||||
//MelonLogger.Msg("Spawned object: " + __result.name);
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(Pool.FlagPooleeForRespawn))]
|
||||
[HarmonyPostfix]
|
||||
private static void FlagPooleeForRespawnPatch(Pool __instance, ref GameObject p)
|
||||
[HarmonyPatch(nameof(Pool.Spawn))]
|
||||
[HarmonyPrefix]
|
||||
private static bool SpawnPatchPre(Pool __instance, ref Vector3 position, ref Quaternion rotation, ref Il2CppSystem.Nullable<Vector3> scale, ref Il2CppSystem.Nullable<bool> autoEnable)
|
||||
{
|
||||
MelonLogger.Msg("Flagged object for respawn: " + p.name);
|
||||
}
|
||||
[HarmonyPatch(nameof(Pool.InstantiatePoolee))]
|
||||
[HarmonyPostfix]
|
||||
private static void InstantiatePooleePatch(Pool __instance, ref Poolee __result)
|
||||
{
|
||||
MelonLogger.Msg("Instantiated object: " + __result.name);
|
||||
if (CallPatchedMethods.allowPatchedMethodCall) return true;
|
||||
|
||||
if (BoneSync.lobby.IsConnected())
|
||||
{
|
||||
MelonLogger.Msg("Patched Spawning object in pool: " + __instance.name);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user