mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix alarm totem "face" angles when toggled by projection totem
This commit is contained in:
parent
b85ec167db
commit
6c1605d0e9
@ -0,0 +1,21 @@
|
|||||||
|
using HarmonyLib;
|
||||||
|
using NewHorizons.Components.EOTE;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Reflection.Emit;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace NewHorizons.Patches.EchoesOfTheEyePatches
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(AlarmTotem))]
|
||||||
|
public static class AlarmTotemPatches
|
||||||
|
{
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(nameof(AlarmTotem.SetFaceOpen))]
|
||||||
|
public static void AlarmTotem_SetFaceOpen(AlarmTotem __instance, bool open)
|
||||||
|
{
|
||||||
|
// This method is unused in the base game and sets the rotations incorrectly (-90f instead of 90f); this corrects that
|
||||||
|
__instance._rightFaceCover.localEulerAngles = Vector3.up * (open ? 90f : 0f);
|
||||||
|
__instance._leftFaceCover.localEulerAngles = Vector3.up * (open ? -90f : 0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user