diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-04-13 11:30:00 +0000 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 17:24:22 +0200 |
commit | 5510cfbeec0bcb59eac770fdb9b5132d7c61b426 (patch) | |
tree | 2a71ecfe949c306bbeadc5eca7b69e23dbbdf477 /src/game/g_main.c | |
parent | 56d892b6df06a88694988a2c8410dfaebc9bf9ac (diff) |
Add a cool down timer to !revert.
This will prevent two (or more) admins from trying to !revert simultaneously and accidentally undoing innocent players' progress.
Diffstat (limited to 'src/game/g_main.c')
-rw-r--r-- | src/game/g_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c index a8677eb..5cfc383 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -282,6 +282,8 @@ vmCvar_t g_reportWelcomeComment; vmCvar_t g_scrimMode; +vmCvar_t g_revertCooldownTime; + static cvarTable_t gameCvarTable[ ] = { // don't override the cheat state set by the system @@ -541,7 +543,9 @@ static cvarTable_t gameCvarTable[ ] = { &g_reportWelcomeComment, "g_reportWelcomeComment", "", CVAR_ARCHIVE, 0, qfalse }, - { &g_scrimMode, "g_scrimMode", "0", CVAR_ARCHIVE, 0, qfalse } + { &g_scrimMode, "g_scrimMode", "0", CVAR_ARCHIVE, 0, qfalse }, + + { &g_revertCooldownTime, "g_revertCooldownTime", "30", CVAR_ARCHIVE, 0, qfalse } }; static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[ 0 ] ); |