Skip to content

Commit

Permalink
reopen tas settings menu to correct page
Browse files Browse the repository at this point in the history
  • Loading branch information
rtldg committed Jan 3, 2022
1 parent d2763d3 commit b25afa8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/sourcemod/scripting/shavit-tas.sp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ stock void FindNewFrictionOffset(int client, bool logOnly = false)
}
}

void OpenTasSettingsMenu(int client)
void OpenTasSettingsMenu(int client, int pos=0)
{
char display[64];
Menu menu = new Menu(MenuHandler_TasSettings, MENU_ACTIONS_DEFAULT);
Expand Down Expand Up @@ -589,7 +589,7 @@ void OpenTasSettingsMenu(int client)
menu.ExitButton = true;
}

menu.Display(client, MENU_TIME_FOREVER);
menu.DisplayAt(client, pos, MENU_TIME_FOREVER);
}

public int MenuHandler_TasSettings(Menu menu, MenuAction action, int param1, int param2)
Expand Down Expand Up @@ -654,7 +654,7 @@ public int MenuHandler_TasSettings(Menu menu, MenuAction action, int param1, int
}
}

OpenTasSettingsMenu(param1);
OpenTasSettingsMenu(param1, GetMenuSelectionPosition());
}
else if (action == MenuAction_Cancel && param2 == MenuCancel_ExitBack)
{
Expand Down

0 comments on commit b25afa8

Please sign in to comment.