-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Minor features - Can change the distance that orbit lines are shown at now using `orbitLineFadeStartDistance` and `orbitLineFadeEndDistance`. ## Bug fixes - Fixed spawning inside cloaks. Fixes #671 - Fixed default system override logging errors on load - Fixed star size in shader params - Fixed water inside of cloaks. Was a bug affecting Tesseract's Secret, although they have their own workaround so this won't change anything. - Fixed missing null check in detail builder orb fix (solves an issue in Intervention). Fixes #708
- Loading branch information
Showing
18 changed files
with
251 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using UnityEngine; | ||
|
||
namespace NewHorizons.Components.Volumes | ||
{ | ||
/// <summary> | ||
/// A cloak can interfere with the rendering of water | ||
/// Water has a lower render queue and is transparent, so you can see the background black cloak over top of the water | ||
/// We fix this by setting the water's render queue to that of the cloak | ||
/// However, this means that when you are inside the water you will see through the cloak since it's not rendered on top | ||
/// To fix that, we set the render queue back to normal when the player enters the water | ||
/// Currently this doesnt nothing to fix probe camera pictures. If you are outside of the water, the probe will see the stars and through the cloak | ||
/// Oh well | ||
/// </summary> | ||
internal class WaterCloakFixerVolume : MonoBehaviour | ||
{ | ||
public Material material; | ||
private OWTriggerVolume _volume; | ||
|
||
public const int WATER_RENDER_QUEUE = 2990; | ||
public const int CLOAK_RENDER_QUEUE = 3000; | ||
|
||
public void Start() | ||
{ | ||
_volume = GetComponent<RadialFluidVolume>().GetOWTriggerVolume(); | ||
|
||
_volume.OnEntry += WaterCloakFixerVolume_OnEntry; | ||
_volume.OnExit += WaterCloakFixerVolume_OnExit; | ||
|
||
material.renderQueue = CLOAK_RENDER_QUEUE; | ||
} | ||
|
||
public void OnDestroy() | ||
{ | ||
_volume.OnEntry -= WaterCloakFixerVolume_OnEntry; | ||
_volume.OnExit -= WaterCloakFixerVolume_OnExit; | ||
} | ||
|
||
private void WaterCloakFixerVolume_OnEntry(GameObject hitObj) | ||
{ | ||
if (hitObj.CompareTag("PlayerDetector")) | ||
{ | ||
material.renderQueue = WATER_RENDER_QUEUE; | ||
} | ||
} | ||
|
||
private void WaterCloakFixerVolume_OnExit(GameObject hitObj) | ||
{ | ||
if (hitObj.CompareTag("PlayerDetector")) | ||
{ | ||
material.renderQueue = CLOAK_RENDER_QUEUE; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.