fix weapon_reparse race condition (#947)

This commit is contained in:
Allusive 2025-12-01 17:10:09 -08:00 committed by GitHub
parent ec88120a97
commit e05e45ebea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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" )