void SV_DropClient(qboolean crash)
{
int i;
- Con_Printf("Client \"%s\" dropped\n", host_client->name);
+ Con_Printf("Client \"%s^%i\" dropped\n", host_client->name, STRING_COLOR_DEFAULT);
// make sure edict is not corrupt (from a level change for example)
host_client->edict = PRVM_EDICT_NUM(host_client - svs.clients + 1);
buf.data = bufdata;
buf.maxsize = sizeof(bufdata);
MSG_WriteByte(&buf, svc_disconnect);
- NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol);
- NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol);
- NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol);
+ NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000);
+ NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000);
+ NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000);
}
// break the net connection
NetConn_Close(host_client->netconnection);
if (sv.frametime)
SV_Physics();
- // send all messages to the clients
- SV_SendClientMessages();
-
- // clear the general datagram
- SV_ClearDatagram();
-
// if this server frame took too long, break out of the loop
if (framelimit > 1 && Sys_DoubleTime() >= aborttime)
break;
}
+ // send all messages to the clients
+ SV_SendClientMessages();
+
// end the server VM frame
SV_VM_End();
clframetime = cl.realframetime = 0.1;
// apply slowmo scaling
- clframetime *= slowmo.value;
+ clframetime *= cl.movevars_slowmo;
// host_framerate overrides all else
if (host_framerate.value)
// Collect input into cmd
CL_Input();
+ // check for new packets
NetConn_ClientFrame();
- if (cls.state == ca_connected)
- {
- CL_ReadFromServer();
- // if running the server remotely, send intentions now after
- // the incoming messages have been read
- //if (!cl.islocalgame)
- // CL_SendCmd();
- }
+ // read a new frame from a demo if needed
+ CL_ReadDemoMessage();
+
+ // now that packets have been read, send input to server
+ CL_SendMove();
+
+ // update client world (interpolate entities, create trails, etc)
+ CL_UpdateWorld();
// update video
if (host_speeds.integer)
time2 = Sys_DoubleTime();
// update audio
- if(csqc_usecsqclistener)
+ if(cl.csqc_usecsqclistener)
{
- S_Update(&csqc_listenermatrix);
- csqc_usecsqclistener = false;
+ S_Update(&cl.csqc_listenermatrix);
+ cl.csqc_usecsqclistener = false;
}
else
S_Update(&r_view.matrix);