Skip to content

Commit

Permalink
Change function to recieve index of Titan
Browse files Browse the repository at this point in the history
`GetPersistentSpawnLoadoutIndex` directly in the function is returning wrong Titan index sometimes, and will reset an unwanted Titan instead. Changing the function to recieve the Titan idex from `uiGlobal.titanSpawnLoadoutIndex` seems to work better, this method also allows calling the command from console to specify a Titan to reset that is not the current selected one.
  • Loading branch information
Zanieon committed Oct 2, 2023
1 parent 604da10 commit 5bda90f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ bool function ClientCommand_SetProgression( entity player, array<string> args )

bool function ClientCommand_ResetTitanAegis( entity player, array<string> args )
{
int suitIndex = GetPersistentSpawnLoadoutIndex( player, "titan" )
if ( !args.len() )
return false

int suitIndex = args[0].tointeger()
player.SetPersistentVar( "titanFDUnlockPoints[" + suitIndex + "]", 0 )
player.SetPersistentVar( "previousFDUnlockPoints[" + suitIndex + "]", 0 )
player.SetPersistentVar( "fdTitanXP[" + suitIndex + "]", 0 )
Expand Down

0 comments on commit 5bda90f

Please sign in to comment.