From 359e75e83f8c4415a624481b33d464bb4bc6005f Mon Sep 17 00:00:00 2001 From: winstxnhdw Date: Wed, 14 Feb 2024 07:23:06 +0800 Subject: [PATCH] feat: make `nutcracker` drop its gun when killed --- lc-hax/Scripts/Helpers/Enemies.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lc-hax/Scripts/Helpers/Enemies.cs b/lc-hax/Scripts/Helpers/Enemies.cs index 3dddb996..ea79e39c 100644 --- a/lc-hax/Scripts/Helpers/Enemies.cs +++ b/lc-hax/Scripts/Helpers/Enemies.cs @@ -20,10 +20,12 @@ internal static partial class Helper { internal static void Kill(this EnemyAI enemyInstance, ulong actualClientId) { if (enemyInstance is NutcrackerEnemyAI nutcracker) { nutcracker.ChangeEnemyOwnerServerRpc(actualClientId); - nutcracker.DropGunServerRpc(Vector3.zero); + nutcracker.KillEnemyOnOwnerClient(); } - enemyInstance.KillEnemyServerRpc(true); + else { + enemyInstance.KillEnemyServerRpc(true); + } } internal static void Kill(EnemyAI enemyInstance) {