New mods for small fixes

This commit is contained in:
SDraw 2023-09-06 20:05:23 +00:00 committed by SDraw
parent 3bed6f4201
commit 3a1c6774e7
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
10 changed files with 227 additions and 0 deletions

31
ml_pvf/Main.cs Normal file
View file

@ -0,0 +1,31 @@
using System.Collections;
using ABI_RC.Core.Player;
namespace ml_pvf
{
public class PostprocessVolumeFix : MelonLoader.MelonMod
{
public override void OnInitializeMelon()
{
MelonLoader.MelonCoroutines.Start(FixVRCameraVolumeTarget());
}
IEnumerator FixVRCameraVolumeTarget()
{
while(PlayerSetup.Instance == null)
yield return null;
while(PlayerSetup.Instance.vrCamera == null)
yield return null;
UnityEngine.Rendering.PostProcessing.PostProcessLayer l_layer = null;
while(l_layer == null)
{
l_layer = PlayerSetup.Instance.vrCamera.GetComponent<UnityEngine.Rendering.PostProcessing.PostProcessLayer>();
yield return null;
}
l_layer.volumeTrigger = PlayerSetup.Instance.vrCamera.transform;
}
}
}