From b317693619d1da5e9e4d07d57cc3868d2f73c4b1 Mon Sep 17 00:00:00 2001 From: Rendo Date: Fri, 28 Nov 2025 19:45:59 +0500 Subject: [PATCH] Fixed last issue --- scripts/weapon_system/weapon_system.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/weapon_system/weapon_system.gd b/scripts/weapon_system/weapon_system.gd index c9d6245..00617b2 100644 --- a/scripts/weapon_system/weapon_system.gd +++ b/scripts/weapon_system/weapon_system.gd @@ -66,7 +66,7 @@ func switch(to: StringName, exit: bool = true): switched_to.emit(current_state) - update_remotes.rpc(to) + update_remotes.rpc(to,exit) func drop(): if slots.find_key(current_state) == "knife": @@ -118,8 +118,8 @@ func return_to_previous(exit: bool = true): switch("knife", exit) @rpc("authority","call_remote","reliable") -func update_remotes(to: StringName): - if current_state != null: +func update_remotes(to: StringName,exit: bool): + if current_state != null and exit: current_state.exit() current_state = slots[to] current_state.enter()