#include "round_handler.qh"
#include <common/mapobjects/triggers.qh>
+#include <common/scores.qh>
#include <common/util.qh>
#include <server/campaign.qh>
#include <server/command/vote.qh>
+#include <server/scores.qh>
#include <server/world.qh>
void round_handler_Think(entity this)
this.wait = false;
this.cnt = this.count + 1; // init countdown
round_starttime = time + this.count;
- reset_map(true, false);
+ reset_map(false);
}
if (this.cnt > 0) // countdown running
int f = this.cnt - 1;
if (f == 0)
{
+ FOREACH_CLIENT((IS_PLAYER(it) || INGAME(it)), {
+ GameRules_scoring_add(it, ROUNDS_PL, 1);
+ });
this.cnt = 0;
this.round_endtime = (this.round_timelimit) ? time + this.round_timelimit : 0;
this.nextthink = time;
+ rounds_played++;
if (this.roundStart) this.roundStart();
return;
}
this.wait = false;
round_handler_Init(5, 5, 180);
this.nextthink = time;
+
+ ScoreInfo_SetLabel_PlayerScore(SP_ROUNDS_PL, "rounds_pl", 0);
}
void round_handler_Reset(float next_think)
if (this.cnt < this.count + 1) this.cnt = this.count + 1;
this.nextthink = next_think;
if (next_think)
+ {
+ if (next_think <= game_starttime) rounds_played = 0;
round_starttime = next_think + this.count;
+ }
}
void round_handler_Remove()