mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[OriginShift] Fixed pickup object respawn height
This commit is contained in:
parent
a03a0c4884
commit
773c651291
5 changed files with 61 additions and 9 deletions
|
@ -63,7 +63,7 @@ internal static class CVRSpawnablePatches
|
|||
[HarmonyPatch(typeof(CVRSpawnable), nameof(CVRSpawnable.Start))]
|
||||
private static void Postfix_CVRSpawnable_Start(ref CVRSpawnable __instance)
|
||||
{
|
||||
//__instance.AddComponentIfMissing<OriginShiftSpawnableReceiver>(); //todo: investigate if this is needed
|
||||
__instance.AddComponentIfMissing<OriginShiftSpawnableReceiver>(); //todo: investigate if this is needed
|
||||
|
||||
// test adding to the wrapper of the spawnable
|
||||
Transform wrapper = __instance.transform.parent;
|
||||
|
@ -216,12 +216,12 @@ internal static class CVRSyncHelperPatches
|
|||
|
||||
internal static class CVRObjectSyncPatches
|
||||
{
|
||||
// [HarmonyPostfix]
|
||||
// [HarmonyPatch(typeof(CVRObjectSync), nameof(CVRObjectSync.Start))]
|
||||
// private static void Postfix_CVRObjectSync_Start(ref CVRObjectSync __instance)
|
||||
// {
|
||||
// __instance.gameObject.AddComponentIfMissing<OriginShiftObjectSyncReceiver>(); // todo: investigate if this is needed
|
||||
// }
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRObjectSync), nameof(CVRObjectSync.Start))]
|
||||
private static void Postfix_CVRObjectSync_Start(ref CVRObjectSync __instance)
|
||||
{
|
||||
__instance.gameObject.AddComponentIfMissing<OriginShiftObjectSyncReceiver>(); // todo: investigate if this is needed
|
||||
}
|
||||
|
||||
[HarmonyPrefix] // inbound object sync
|
||||
[HarmonyPatch(typeof(CVRObjectSync), nameof(CVRObjectSync.receiveNetworkData))]
|
||||
|
@ -282,4 +282,14 @@ internal static class CVRPortalManagerPatches
|
|||
}
|
||||
}
|
||||
|
||||
internal static class CVRPickupObjectPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(CVRPickupObject), nameof(CVRPickupObject.Start))]
|
||||
private static void Postfix_CVRPickupObject_Start(ref CVRPickupObject __instance)
|
||||
{
|
||||
__instance.gameObject.AddComponentIfMissing<OriginShiftPickupObjectReceiver>();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue