mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
Fixed automatic muting/mute to work properly with realtime resets.
Timothy C. McGrath (Misty)
This commit is contained in:
parent
8f2b541b25
commit
bd82405643
2 changed files with 6 additions and 5 deletions
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue