}
}
-void ClientCommand_ready(entity caller, int request) // todo: anti-spam for toggling readyness
+void ClientCommand_ready(entity caller, int request)
{
switch (request)
{
case CMD_REQUEST_COMMAND:
{
- if (IS_CLIENT(caller))
+ if (IS_CLIENT(caller) && caller.last_ready < time - 3)
{
if (warmup_stage || g_race_qualifying == 2)
{
bprint(playername(caller.netname, caller.team, false), "^2 is ready\n");
}
+ caller.last_ready = time;
+
// cannot reset the game while a timeout is active!
if (!timeout_status) ReadyCount();
}
entity nagger;
float readycount; // amount of players who are ready
.float ready; // flag for if a player is ready
+.float last_ready; // last ready time for anti-spam
.int team_saved; // team number to restore upon map reset
.void(entity this) reset; // if set, an entity is reset using this
.void(entity this) reset2; // if set, an entity is reset using this (after calling ALL the reset functions for other entities)