## Bug fixes

- Reverted sand effect ruleset fix that actually broke things (made the
player blind when standing on sand underwater in some instances).
This commit is contained in:
xen-42 2025-09-24 12:58:06 -04:00 committed by GitHub
commit 30cb5253ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 15 deletions

View File

@ -10,7 +10,6 @@ namespace NewHorizons.Builder.Body
private static GameObject _sandCollider;
private static GameObject _sandOcclusion;
private static GameObject _sandProxyShadowCaster;
private static Material _hgtSandEffectMaterial;
private static bool _isInit;
@ -24,7 +23,6 @@ namespace NewHorizons.Builder.Body
if (_sandCollider == null) _sandCollider = SearchUtilities.Find("TowerTwin_Body/SandSphere_Draining/Collider").InstantiateInactive().Rename("Prefab_TT_SandCollider").DontDestroyOnLoad();
if (_sandOcclusion == null) _sandOcclusion = SearchUtilities.Find("TowerTwin_Body/SandSphere_Draining/OcclusionSphere").InstantiateInactive().Rename("Prefab_TT_SandOcclusion").DontDestroyOnLoad();
if (_sandProxyShadowCaster == null) _sandProxyShadowCaster = SearchUtilities.Find("TowerTwin_Body/SandSphere_Draining/ProxyShadowCaster").InstantiateInactive().Rename("Prefab_TT_SandProxyShadowCaster").DontDestroyOnLoad();
if (_hgtSandEffectMaterial == null) _hgtSandEffectMaterial = new Material(SearchUtilities.Find("FocalBody/Sector_HGT").GetComponent<EffectRuleset>()._sandMaterial).DontDestroyOnLoad();
}
public static void Make(GameObject planetGO, Sector sector, OWRigidbody rb, SandModule module)
@ -37,14 +35,6 @@ namespace NewHorizons.Builder.Body
var sandSphere = Object.Instantiate(_sandSphere, sandGO.transform);
sandSphere.name = "Sphere";
sandSphere.SetActive(true);
sandSphere.AddComponent<SphereShape>().radius = 1;
sandSphere.AddComponent<OWTriggerVolume>();
var sandEffectMaterial = new Material(_hgtSandEffectMaterial);
var sER = sandSphere.AddComponent<EffectRuleset>();
sER._type = EffectRuleset.BubbleType.None;
sER._sandMaterial = sandEffectMaterial;
if (module.tint != null)
{
var oldMR = sandSphere.GetComponent<TessellatedSphereRenderer>();
@ -59,10 +49,6 @@ namespace NewHorizons.Builder.Body
Object.Destroy(oldMR);
sandMR.sharedMaterials[0].color = module.tint.ToColor();
sandMR.sharedMaterials[1].color = module.tint.ToColor();
var baseColor = module.tint.ToColor();
var effectColor = new Color(baseColor.r * 0.184f, baseColor.g * 0.184f, baseColor.b * 0.184f, baseColor.a); // base game does .184 darker
sandEffectMaterial.color = effectColor;
}
var collider = Object.Instantiate(_sandCollider, sandGO.transform);

View File

@ -4,7 +4,7 @@
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, and friends",
"name": "New Horizons",
"uniqueName": "xen.NewHorizons",
"version": "1.28.7",
"version": "1.28.8",
"owmlVersion": "2.12.1",
"dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
"conflicts": [ "PacificEngine.OW_CommonResources" ],