Fixed automatic muting/mute to work properly with realtime resets.

Timothy C. McGrath (Misty)
This commit is contained in:
Timothy C. McGrath 2002-06-06 23:05:57 +00:00
parent 8f2b541b25
commit bd82405643
2 changed files with 6 additions and 5 deletions

View file

@ -639,7 +639,7 @@ SV_Mute_f (void)
if (!cl->state)
continue;
if (all || (cl->userid == uid)) {
cl->lockedtill = realtime + mins*60.0;
cl->lockedtill = (Sys_DoubleTime () + mins*60.0);
done = true;
if (mins) {
sprintf(text, "You are muted for %.1f minutes\n\n"

View file

@ -798,10 +798,11 @@ SV_Say (qboolean team)
}
if (fp_messages) {
if (!sv.paused && realtime < host_client->lockedtill) {
if (!sv.paused && Sys_DoubleTime () < host_client->lockedtill) {
SV_ClientPrintf (host_client, PRINT_CHAT,
"You can't talk for %d more seconds\n",
(int) (host_client->lockedtill - realtime));
"You can't talk for %d more seconds\n",
(int) (host_client->lockedtill -
Sys_DoubleTime () ));
return;
}
tmp = host_client->whensaidhead - fp_messages + 1;
@ -810,7 +811,7 @@ SV_Say (qboolean team)
if (!sv.paused &&
host_client->whensaid[tmp]
&& (realtime - host_client->whensaid[tmp] < fp_persecond)) {
host_client->lockedtill = realtime + fp_secondsdead;
host_client->lockedtill = Sys_DoubleTime () + fp_secondsdead;
if (fp_msg[0])
SV_ClientPrintf (host_client, PRINT_CHAT,
"FloodProt: %s\n", fp_msg);