From d7fd72abefff17a88523b434a0068746452d90a4 Mon Sep 17 00:00:00 2001 From: Stefan Mielke Date: Thu, 22 Jan 2026 17:41:03 -0300 Subject: [PATCH] Remove weapons on death --- DFUVR/Plugin.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DFUVR/Plugin.cs b/DFUVR/Plugin.cs index 72fb932..da07df4 100644 --- a/DFUVR/Plugin.cs +++ b/DFUVR/Plugin.cs @@ -144,6 +144,21 @@ static void Postfix(DaggerfallMissile __instance) } } + + [HarmonyPatch(typeof(PlayerDeath), "PlayerEntity_OnDeath")] + public class PlayerDeathPatch : MonoBehaviour + { + static void Prefix(PlayerDeath __instance) + { + if (Var.weaponObject != null) + Destroy(Var.weaponObject); + + Var.currentWeaponName = null; + Hands.rHand.SetActive(true); + Hands.lHand.SetActive(true); + } + } + //[HarmonyPatch(typeof(DaggerfallMissile), "Start")] //public class SpawnMissileCameraPatch : MonoBehaviour //{