diff options
Diffstat (limited to 'src/server/sv_snapshot.c')
-rw-r--r-- | src/server/sv_snapshot.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/sv_snapshot.c b/src/server/sv_snapshot.c index bbd1fc01..cfc56958 100644 --- a/src/server/sv_snapshot.c +++ b/src/server/sv_snapshot.c @@ -351,7 +351,7 @@ static void SV_AddEntitiesVisibleFromPoint( vec3_t origin, clientSnapshot_t *fra // entities can be flagged to be sent to a given mask of clients if ( ent->r.svFlags & SVF_CLIENTMASK ) { if (frame->ps.clientNum >= 32) - Com_Error( ERR_DROP, "SVF_CLIENTMASK: cientNum > 32\n" ); + Com_Error( ERR_DROP, "SVF_CLIENTMASK: clientNum >= 32\n" ); if (~ent->r.singleClient & (1 << frame->ps.clientNum)) continue; } @@ -556,7 +556,7 @@ static int SV_RateMsec( client_t *client, int messageSize ) { rate = sv_minRate->integer; } - rateMsec = ( messageSize + HEADER_RATE_BYTES ) * 1000 / rate * com_timescale->value; + rateMsec = ( messageSize + HEADER_RATE_BYTES ) * 1000 / ((int) (rate * com_timescale->value)); return rateMsec; } @@ -585,7 +585,7 @@ void SV_SendMessageToClient( msg_t *msg, client_t *client ) { // TTimo - https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=491 // added sv_lanForceRate check if ( client->netchan.remoteAddress.type == NA_LOOPBACK || (sv_lanForceRate->integer && Sys_IsLANAddress (client->netchan.remoteAddress)) ) { - client->nextSnapshotTime = svs.time + (1000.0 / sv_fps->integer * com_timescale->value); + client->nextSnapshotTime = svs.time + ((int) (1000.0 / sv_fps->integer * com_timescale->value)); return; } @@ -600,15 +600,15 @@ void SV_SendMessageToClient( msg_t *msg, client_t *client ) { client->rateDelayed = qtrue; } - client->nextSnapshotTime = svs.time + rateMsec * com_timescale->value; + client->nextSnapshotTime = svs.time + ((int) (rateMsec * com_timescale->value)); // don't pile up empty snapshots while connecting if ( client->state != CS_ACTIVE ) { // a gigantic connection message may have already put the nextSnapshotTime // more than a second away, so don't shorten it // do shorten if client is downloading - if (!*client->downloadName && client->nextSnapshotTime < svs.time + 1000 * com_timescale->value) - client->nextSnapshotTime = svs.time + 1000 * com_timescale->value; + if (!*client->downloadName && client->nextSnapshotTime < svs.time + ((int) (1000.0 * com_timescale->value))) + client->nextSnapshotTime = svs.time + ((int) (1000 * com_timescale->value)); } } |