mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Add track to Shavit_OnWRDeleted.
This commit is contained in:
parent
17c3c2c2db
commit
e903614ca0
@ -384,9 +384,10 @@ forward void Shavit_OnWorldRecord(int client, int style, float time, int jumps,
|
|||||||
*
|
*
|
||||||
* @param style Style the record was done on.
|
* @param style Style the record was done on.
|
||||||
* @param id Record ID. -1 if mass deletion.
|
* @param id Record ID. -1 if mass deletion.
|
||||||
|
* @param track Timer track.
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
forward void Shavit_OnWRDeleted(int style, int id);
|
forward void Shavit_OnWRDeleted(int style, int id, int track);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player's timer paused.
|
* Called when a player's timer paused.
|
||||||
|
|||||||
@ -123,7 +123,7 @@ public void OnPluginStart()
|
|||||||
// forwards
|
// forwards
|
||||||
gH_OnWorldRecord = CreateGlobalForward("Shavit_OnWorldRecord", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
|
gH_OnWorldRecord = CreateGlobalForward("Shavit_OnWorldRecord", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
|
||||||
gH_OnFinish_Post = CreateGlobalForward("Shavit_OnFinish_Post", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
|
gH_OnFinish_Post = CreateGlobalForward("Shavit_OnFinish_Post", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
|
||||||
gH_OnWRDeleted = CreateGlobalForward("Shavit_OnWRDeleted", ET_Event, Param_Cell, Param_Cell);
|
gH_OnWRDeleted = CreateGlobalForward("Shavit_OnWRDeleted", ET_Event, Param_Cell, Param_Cell, Param_Cell);
|
||||||
gH_OnWorstRecord = CreateGlobalForward("Shavit_OnWorstRecord", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
|
gH_OnWorstRecord = CreateGlobalForward("Shavit_OnWorstRecord", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell, Param_Cell);
|
||||||
|
|
||||||
// player commands
|
// player commands
|
||||||
@ -1051,7 +1051,7 @@ public int DeleteConfirm_Handler(Menu menu, MenuAction action, int param1, int p
|
|||||||
Call_StartForward(gH_OnWRDeleted);
|
Call_StartForward(gH_OnWRDeleted);
|
||||||
Call_PushCell(i);
|
Call_PushCell(i);
|
||||||
Call_PushCell(iRecordID);
|
Call_PushCell(iRecordID);
|
||||||
// Call_PushCell(j); // TODO: TRACK
|
Call_PushCell(j);
|
||||||
Call_Finish();
|
Call_Finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1119,10 +1119,14 @@ public void DeleteAll_Callback(Database db, DBResultSet results, const char[] er
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Call_StartForward(gH_OnWRDeleted);
|
for(int j = 0; j < TRACKS_SIZE; j++)
|
||||||
Call_PushCell(i);
|
{
|
||||||
Call_PushCell(-1);
|
Call_StartForward(gH_OnWRDeleted);
|
||||||
Call_Finish();
|
Call_PushCell(i);
|
||||||
|
Call_PushCell(-1);
|
||||||
|
Call_PushCell(j);
|
||||||
|
Call_Finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int client = GetClientFromSerial(data);
|
int client = GetClientFromSerial(data);
|
||||||
@ -1719,13 +1723,13 @@ public int SubMenu_Handler(Menu m, MenuAction action, int param1, int param2)
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main); // TODO: use client's cached track
|
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(action == MenuAction_Cancel && param2 == MenuCancel_ExitBack)
|
else if(action == MenuAction_Cancel && param2 == MenuCancel_ExitBack)
|
||||||
{
|
{
|
||||||
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main); // TODO: use client's cached track
|
StartWRMenu(param1, gS_ClientMap[param1], gBS_LastWR[param1], Track_Main);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(action == MenuAction_End)
|
else if(action == MenuAction_End)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user