Skip to content

Commit b482f7f

Browse files
Replace uses of "disconnect" with NSDisconnectPlayer
1 parent a169e16 commit b482f7f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Northstar.Custom/mod/scripts/vscripts/burnmeter/sh_burnmeter.gnut

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ string function GetSelectedBurnCardRef( entity player )
207207

208208
#if SERVER
209209
if ( GetItemDisplayData( ref ).hidden )
210-
ClientCommand( player, "disconnect" )
210+
NSDisconnectPlayer( player )
211211
#endif
212212

213213
#if SERVER || CLIENT

Northstar.CustomServers/mod/scripts/vscripts/sh_loadouts.nut

+3-2
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ string function GetValidatedPersistentLoadoutValue( entity player, string loadou
15091509
{
15101510
printt( "Invalid Loadout Property: ", loadoutType, loadoutIndex, loadoutProperty, value )
15111511
value = ResetLoadoutPropertyToDefault( player, loadoutType, loadoutIndex, loadoutProperty ) //TODO: This will call player.SetPersistentVar() directly. Awkward to do this in a getter function
1512-
ClientCommand( player, "disconnect #RESETTING_LOADOUT", 0 ) //Kick player out with a "Resetting Invalid Loadout" message. Mainly necessary so UI/Client script don't crash out later with known, bad data from persistence
1512+
NSDisconnectPlayer( player, "#RESETTING_LOADOUT" ) // Kick player out with a "Resetting Invalid Loadout" message. Mainly necessary so UI/Client script don't crash out later with known, bad data from persistence
15131513
}
15141514
}
15151515

@@ -1519,7 +1519,8 @@ string function GetValidatedPersistentLoadoutValue( entity player, string loadou
15191519
{
15201520
printt( "Invalid Loadout Property: ", loadoutType, loadoutIndex, loadoutProperty, value )
15211521
value = ResetLoadoutPropertyToDefault( player, loadoutType, loadoutIndex, loadoutProperty ) //TODO: This will call player.SetPersistentVar() directly. Awkward to do this in a getter function
1522-
ClientCommand( player, "disconnect #RESETTING_LOADOUT", 0 ) //Kick player out with a "Resetting Invalid Loadout" message. Mainly necessary so UI/Client script don't crash out later with known, bad data from persistence
1522+
NSDisconnectPlayer( player, "#RESETTING_LOADOUT" ) // Kick player out with a "Resetting Invalid Loadout" message. Mainly necessary so UI/Client script don't crash out later with known, bad data from persistence
1523+
15231524
}
15241525

15251526
ValidateSkinAndCamoIndexesAsAPair( player, loadoutType, loadoutIndex, loadoutProperty, value ) //TODO: This is awkward, has the potential to call a SetPersistentLoadoutValue() if skinIndex and camoIndex are not correct as a pair

0 commit comments

Comments
 (0)