From 67f354630e2dd0f470461e0fe528680c064c5e99 Mon Sep 17 00:00:00 2001 From: Michael Flaherty Date: Sat, 13 Jan 2018 16:55:32 -0800 Subject: [PATCH] Add waiting queue to Retakes_OnPostRoundEnqueue (#135) Add waiting queue to Retakes_OnPostRoundEnqueue. --- scripting/include/retakes.inc | 3 ++- scripting/retakes.sp | 3 ++- scripting/retakes/generic.sp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripting/include/retakes.inc b/scripting/include/retakes.inc index d8ec039..cffbc93 100644 --- a/scripting/include/retakes.inc +++ b/scripting/include/retakes.inc @@ -47,9 +47,10 @@ forward void Retakes_OnPreRoundEnqueue(Handle rankingQueue, Handle waitingQueue) * (rather than using the Retakes_SetRoundPoints native) * * @param rankingQueue a priority queue (see include/priorityqueue.inc) + * @param waitingQueue a queue of the players waiting to join (see include/queue.inc) * @noreturn */ -forward void Retakes_OnPostRoundEnqueue(Handle rankingQueue); +forward void Retakes_OnPostRoundEnqueue(Handle rankingQueue, Handle waitingQueue); /** * Called when the bombsite for the round is decided. diff --git a/scripting/retakes.sp b/scripting/retakes.sp index 7f2ef26..f77bd02 100644 --- a/scripting/retakes.sp +++ b/scripting/retakes.sp @@ -208,7 +208,7 @@ public void OnPluginStart() { HookEvent("announce_phase_end", Event_HalfTime); g_hOnGunsCommand = CreateGlobalForward("Retakes_OnGunsCommand", ET_Ignore, Param_Cell); - g_hOnPostRoundEnqueue = CreateGlobalForward("Retakes_OnPostRoundEnqueue", ET_Ignore, Param_Cell); + g_hOnPostRoundEnqueue = CreateGlobalForward("Retakes_OnPostRoundEnqueue", ET_Ignore, Param_Cell, Param_Cell); g_hOnPreRoundEnqueue = CreateGlobalForward("Retakes_OnPreRoundEnqueue", ET_Ignore, Param_Cell, Param_Cell); g_hOnTeamSizesSet = CreateGlobalForward("Retakes_OnTeamSizesSet", ET_Ignore, Param_CellByRef, Param_CellByRef); g_hOnTeamsSet = CreateGlobalForward("Retakes_OnTeamsSet", ET_Ignore, Param_Cell, Param_Cell, Param_Cell); @@ -709,6 +709,7 @@ public void RoundEndUpdates() { Call_StartForward(g_hOnPostRoundEnqueue); Call_PushCell(g_hRankingQueue); + Call_PushCell(g_hWaitingQueue); Call_Finish(); } diff --git a/scripting/retakes/generic.sp b/scripting/retakes/generic.sp index 01ae8e9..81e4786 100644 --- a/scripting/retakes/generic.sp +++ b/scripting/retakes/generic.sp @@ -1,6 +1,6 @@ #tryinclude "manual_version.sp" #if !defined PLUGIN_VERSION -#define PLUGIN_VERSION "0.3.3" +#define PLUGIN_VERSION "0.3.4" #endif #define INTEGER_STRING_LENGTH 20 // max number of digits a 64-bit integer can use up as a string