Skip to content

Commit

Permalink
Series Cancel Event (splewis#570)
Browse files Browse the repository at this point in the history
* Series Cancel Event

Created an event that is called when there is a cancelation by an admin

* Fixed typo

* Removed winner = TeamNone
  • Loading branch information
yannickgloster authored Sep 29, 2020
1 parent fc9f4f2 commit 2c9a326
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripting/get5.sp
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ public Action Command_EndMatch(int client, int args) {
Call_PushCell(GetMapNumber() - 1);
Call_Finish();

EventLogger_SeriesCancel(g_TeamSeriesScores[MatchTeam_Team1], g_TeamSeriesScores[MatchTeam_Team2]);
LogDebug("Calling Get5_OnSeriesResult(winner=%d, team1_series_score=%d, team2_series_score=%d)",
MatchTeam_TeamNone, g_TeamSeriesScores[MatchTeam_Team1],
g_TeamSeriesScores[MatchTeam_Team2]);
Expand Down
7 changes: 7 additions & 0 deletions scripting/get5/eventlogger.sp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ public void EventLogger_SeriesEnd(MatchTeam winner, int t1score, int t2score) {
EventLogger_EndEvent("series_end");
}

public void EventLogger_SeriesCancel(int t1score, int t2score) {
EventLogger_StartEvent();
params.SetInt("team1_series_score", t1score);
params.SetInt("team2_series_score", t2score);
EventLogger_EndEvent("series_cancel");
}

public void EventLogger_BackupLoaded(const char[] path) {
EventLogger_StartEvent();
params.SetString("file", path);
Expand Down

0 comments on commit 2c9a326

Please sign in to comment.