From e05e45ebeac4e25a7dbebab3754c9da599760daa Mon Sep 17 00:00:00 2001 From: Allusive <154700875+AllusiveWheat@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:10:09 -0800 Subject: [PATCH] fix weapon_reparse race condition (#947) --- .../mod/scripts/vscripts/ui/menu_ns_modmenu.nut | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut index d5e36f2b..6f41a71e 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_modmenu.nut @@ -704,10 +704,8 @@ void function ReloadMods() ClientCommand( "reload_localization" ) ClientCommand( "loadPlaylists" ) - bool svCheatsOriginal = GetConVarBool( "sv_cheats" ) - SetConVarBool( "sv_cheats", true ) - ClientCommand( "weapon_reparse" ) // weapon_reparse only works if a server is running and sv_cheats is 1, gotta figure this out eventually - SetConVarBool( "sv_cheats", svCheatsOriginal ) + int svCheatsOriginal = GetConVarInt( "sv_cheats" ) + ClientCommand( "sv_cheats 1;weapon_reparse;sv_cheats " + svCheatsOriginal ) // weapon_reparse only works if a server is running and sv_cheats is 1, gotta figure this out eventually // note: the logic for this seems really odd, unsure why it doesn't seem to update, since the same code seems to get run irregardless of whether we've read weapon data before ClientCommand( "uiscript_reset" )