mirror of
https://github.com/Raicuparta/nomai-vr.git
synced 2025-12-11 20:15:08 +01:00
26 lines
866 B
C#
26 lines
866 B
C#
namespace NomaiVR.EffectFixes
|
|
{
|
|
internal class DisableDeathAnimation : NomaiVRModule<NomaiVRModule.EmptyBehaviour, DisableDeathAnimation.Patch>
|
|
{
|
|
protected override bool IsPersistent => false;
|
|
protected override OWScene[] Scenes => PlayableScenes;
|
|
|
|
public class Patch : NomaiVRPatch
|
|
{
|
|
public override void ApplyPatches()
|
|
{
|
|
Prefix<PlayerCharacterController>(nameof(PlayerCharacterController.OnPlayerDeath), nameof(PrePlayerDeath));
|
|
}
|
|
|
|
private static bool PrePlayerDeath(DeathType deathType)
|
|
{
|
|
if (deathType == DeathType.Impact || deathType == DeathType.Default || deathType == DeathType.Asphyxiation)
|
|
{
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|