diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-02-14 18:12:41 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-02-14 18:12:41 +0000 |
commit | a5afaf65af8ef50d1ce8bbd9e2133239013c26f7 (patch) | |
tree | 699e5d4a3402ef403d98697f8b1e423036783c10 /source/sv_send.c | |
parent | 5fb93fcf0ba8877e8bda060370d2c722494971f5 (diff) |
Stop client demo recording when `changing' command is received.
Prevent cl.time calculations from overflowing on high server frames.
Diffstat (limited to 'source/sv_send.c')
-rw-r--r-- | source/sv_send.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/sv_send.c b/source/sv_send.c index 1177a92..c87a16c 100644 --- a/source/sv_send.c +++ b/source/sv_send.c @@ -80,10 +80,10 @@ static qboolean SV_RateDrop( client_t *client ) { return qfalse; } -void SV_CalcSendTime( client_t *client, int messageSize ) { +void SV_CalcSendTime( client_t *client, int size ) { int delta; - if( messageSize == -1 ) { + if( size == -1 ) { return; } @@ -93,9 +93,9 @@ void SV_CalcSendTime( client_t *client, int messageSize ) { return; } - client->message_size[sv.framenum % RATE_MESSAGES] = messageSize; + client->message_size[sv.framenum % RATE_MESSAGES] = size; - delta = messageSize * 1000 / client->rate; + delta = size * 1000 / client->rate; client->sendTime = svs.realtime + delta; } |