diff --git a/SCHIZO/Items/FumoItem/FumoItemPatches.BelowZero.cs b/SCHIZO/Items/FumoItem/FumoItemPatches.BelowZero.cs index 6c5eb95e..72215a75 100644 --- a/SCHIZO/Items/FumoItem/FumoItemPatches.BelowZero.cs +++ b/SCHIZO/Items/FumoItem/FumoItemPatches.BelowZero.cs @@ -42,31 +42,24 @@ private static IEnumerator SpawnFumoCoro(LifepodDrop pod) KnownTech.Add(fumoItem, false, false); } - // sometimes things just spawn twice. shrug + // shouldn't spawn twice anymore w/ new code but shrug if (Object.FindObjectOfType()) { LOGGER.LogWarning("Attempted to spawn fumo in lifepod twice"); yield break; } - - LOGGER.LogMessage("Spawning fumo in lifepod drop"); - GameObject obj = UWE.Utils.InstantiateDeactivated(prefab, pod.transform, spawnLoc.position, Quaternion.Euler(spawnLoc.rotation)); - - LargeWorldEntity lwe = obj.GetComponent(); - yield return new WaitUntil(() => LargeWorldStreamer.main && LargeWorldStreamer.main.IsReady()); LargeWorldStreamer lws = LargeWorldStreamer.main; - if (lwe is { cellLevel: not LargeWorldEntity.CellLevel.Batch and not LargeWorldEntity.CellLevel.Global }) - { - Int3 batch = lws.GetContainingBatch(obj.transform.position); - yield return new WaitUntil(() => lws.IsBatchReadyToCompile(batch)); - } + Int3 batch = lws.GetContainingBatch(pod.transform.localToWorldMatrix.MultiplyPoint(spawnLoc.position)); + yield return new WaitUntil(() => lws.IsBatchReadyToCompile(batch)); yield return new WaitUntil(() => LargeWorld.main && LargeWorld.main.streamer.globalRoot != null); - LargeWorld lw = LargeWorld.main; - lw.streamer.cellManager.RegisterEntity(obj); + LOGGER.LogMessage("Spawning fumo in lifepod drop"); + GameObject obj = UWE.Utils.InstantiateDeactivated(prefab, pod.transform, spawnLoc.position, Quaternion.Euler(spawnLoc.rotation)); obj.SetActive(true); + + LargeWorldEntity.Register(obj); } } diff --git a/SCHIZO/Resources/AssetBundles/Assets.cs b/SCHIZO/Resources/AssetBundles/Assets.cs index 76050c45..e16e02f5 100644 --- a/SCHIZO/Resources/AssetBundles/Assets.cs +++ b/SCHIZO/Resources/AssetBundles/Assets.cs @@ -12,7 +12,7 @@ namespace SCHIZO.Resources; public static class Assets { - private const int _rnd = 332438850; + private const int _rnd = 488613676; private static readonly UnityEngine.AssetBundle _a = ResourceManager.GetAssetBundle("assets"); diff --git a/SCHIZO/Resources/AssetBundles/assets b/SCHIZO/Resources/AssetBundles/assets index 8f849fad..dde70049 100644 Binary files a/SCHIZO/Resources/AssetBundles/assets and b/SCHIZO/Resources/AssetBundles/assets differ diff --git a/Unity/Assets/Mod/Evil Fumo/Evil Fumo item.prefab b/Unity/Assets/Mod/Evil Fumo/Evil Fumo item.prefab index e2039975..1ba4ba5b 100644 --- a/Unity/Assets/Mod/Evil Fumo/Evil Fumo item.prefab +++ b/Unity/Assets/Mod/Evil Fumo/Evil Fumo item.prefab @@ -1,5 +1,18 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!65 &4332142020512149085 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3050323588128677620} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 4.0000005, y: 4.3434496, z: 3.2994847} + m_Center: {x: -0, y: 2.1420708, z: -0.17539322} --- !u!1 &4427810026626581335 GameObject: m_ObjectHideFlags: 0 @@ -38,14 +51,36 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5958827312421353464} serializedVersion: 2 - m_Mass: 5 - m_Drag: 0.1 + m_Mass: 0.5 + m_Drag: 0.5 m_AngularDrag: 0.05 - m_UseGravity: 1 + m_UseGravity: 0 m_IsKinematic: 0 m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 3 +--- !u!114 &-2743290300116954017 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5958827312421353464} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3af24dbe2e70427cb93275ef00f34823, type: 3} + m_Name: + m_EditorClassIdentifier: + useRigidbody: {fileID: 3813723675008832454} + moveWithPlatform: 1 + handleGravity: 1 + aboveWaterGravity: 9.81 + underwaterGravity: 2 + handleDrag: 1 + aboveWaterDrag: 0 + underwaterDrag: 0.5 + handleWind: 0 + windScalar: 1 --- !u!114 &986444971531117965 MonoBehaviour: m_ObjectHideFlags: 0 @@ -162,19 +197,6 @@ MonoBehaviour: _fabricatorMesh: {fileID: 4300000, guid: f02dbf41adbb6c14c8b2eb4704e4fd18, type: 2} _fabricatorPrefab: {fileID: 4931248133309480, guid: 18b270460e531e34ca5ebc989dccd026, type: 3} ---- !u!65 &4332142020512149085 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3050323588128677620} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 4.0000005, y: 4.3434496, z: 3.2994847} - m_Center: {x: -0, y: 2.1420708, z: -0.17539322} --- !u!1001 &8219148621552729296 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Unity/Assets/Mod/Neurofumo/Neurofumo item.prefab b/Unity/Assets/Mod/Neurofumo/Neurofumo item.prefab index 59a365ea..0c5d69fa 100644 --- a/Unity/Assets/Mod/Neurofumo/Neurofumo item.prefab +++ b/Unity/Assets/Mod/Neurofumo/Neurofumo item.prefab @@ -1,5 +1,25 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &334745811986472101 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5052461778956576287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1b9fb29e8f4c4ae99c44aaf8bf20015f, type: 3} + m_Name: + m_EditorClassIdentifier: + localMinY: -0.01 + localMaxY: 0.44 + posOffset: {x: 0, y: -0.01, z: 0} + eulerOffset: {x: 0, y: 0, z: 0} + scaleFactor: 1 + _fabricatorMesh: {fileID: 4300000, guid: f02dbf41adbb6c14c8b2eb4704e4fd18, type: 2} + _fabricatorPrefab: {fileID: 4931248133309480, guid: 18b270460e531e34ca5ebc989dccd026, + type: 3} --- !u!54 &-3198660705918623929 Rigidbody: m_ObjectHideFlags: 0 @@ -8,14 +28,36 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 5527787040625736568} serializedVersion: 2 - m_Mass: 5 - m_Drag: 0.1 + m_Mass: 0.5 + m_Drag: 0.5 m_AngularDrag: 0.05 - m_UseGravity: 1 + m_UseGravity: 0 m_IsKinematic: 0 m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 3 +--- !u!114 &-4845083955997906334 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5527787040625736568} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3af24dbe2e70427cb93275ef00f34823, type: 3} + m_Name: + m_EditorClassIdentifier: + useRigidbody: {fileID: -3198660705918623929} + moveWithPlatform: 1 + handleGravity: 1 + aboveWaterGravity: 9.81 + underwaterGravity: 2 + handleDrag: 1 + aboveWaterDrag: 0 + underwaterDrag: 0.5 + handleWind: 0 + windScalar: 1 --- !u!114 &5550508841886641735 MonoBehaviour: m_ObjectHideFlags: 0 @@ -109,26 +151,6 @@ MonoBehaviour: hugColdResistBuff: 20 fumoModelSN: {fileID: 5699160057072596943} fumoModelBZ: {fileID: 7859187418265201921} ---- !u!114 &334745811986472101 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5052461778956576287} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1b9fb29e8f4c4ae99c44aaf8bf20015f, type: 3} - m_Name: - m_EditorClassIdentifier: - localMinY: -0.01 - localMaxY: 0.44 - posOffset: {x: 0, y: -0.01, z: 0} - eulerOffset: {x: 0, y: 0, z: 0} - scaleFactor: 1 - _fabricatorMesh: {fileID: 4300000, guid: f02dbf41adbb6c14c8b2eb4704e4fd18, type: 2} - _fabricatorPrefab: {fileID: 4931248133309480, guid: 18b270460e531e34ca5ebc989dccd026, - type: 3} --- !u!65 &2518586707761524305 BoxCollider: m_ObjectHideFlags: 0