mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
add back reset checkpoints option when tas menu stuff
This commit is contained in:
parent
3d40d4f809
commit
ecbc7edca2
@ -1124,11 +1124,8 @@ void OpenNormalCPMenu(int client)
|
||||
FormatEx(sDisplay, 64, "%T", "MiscCheckpointDeleteCurrent", client);
|
||||
menu.AddItem("del", sDisplay, (gA_Checkpoints[client].Length > 0) ? ITEMDRAW_DEFAULT:ITEMDRAW_DISABLED);
|
||||
|
||||
if (!tas_timescale)
|
||||
{
|
||||
FormatEx(sDisplay, 64, "%T", "MiscCheckpointReset", client);
|
||||
menu.AddItem("reset", sDisplay);
|
||||
}
|
||||
|
||||
if(!bSegmented)
|
||||
{
|
||||
|
||||
@ -299,26 +299,21 @@ public Action Shavit_OnCheckpointMenuMade(int client, bool segmented, Menu menu)
|
||||
|
||||
char sDisplay[64];
|
||||
bool tas_timescale = (Shavit_GetStyleSettingFloat(Shavit_GetBhopStyle(client), "tas_timescale") == -1.0);
|
||||
int delcurrentcheckpoint = -1;
|
||||
|
||||
FormatEx(sDisplay, 64, "%T\n ", "TasSettings", client);
|
||||
|
||||
if (tas_timescale)
|
||||
{
|
||||
if ((delcurrentcheckpoint = FindMenuItem(menu, "del")) != -1)
|
||||
int pos = FindMenuItem(menu, "del");
|
||||
menu.InsertItem(pos, "tassettings", sDisplay);
|
||||
}
|
||||
else
|
||||
{
|
||||
menu.RemoveItem(delcurrentcheckpoint);
|
||||
}
|
||||
}
|
||||
|
||||
FormatEx(sDisplay, 64, "%T\n ", "TasSettings", client);
|
||||
menu.AddItem("tassettings", sDisplay);
|
||||
//menu.ExitButton = false;
|
||||
|
||||
if (delcurrentcheckpoint != -1)
|
||||
{
|
||||
FormatEx(sDisplay, 64, "%T", "MiscCheckpointDeleteCurrent", client);
|
||||
menu.AddItem("del", sDisplay, (Shavit_GetTotalCheckpoints(client) > 0) ? ITEMDRAW_DEFAULT:ITEMDRAW_DISABLED);
|
||||
}
|
||||
|
||||
menu.ExitButton = gEV_Type != Engine_CSGO;
|
||||
|
||||
return Plugin_Changed;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user