git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6018
d7cf8633-e32d-0410-b094-
e92efae38249
upmove = cl.cmd.upmove;
#endif
upmove = cl.cmd.upmove;
#endif
- CL_UpdatePrydonCursor();
+ if (cls.signon == SIGNONS)
+ CL_UpdatePrydonCursor();
buf.maxsize = 128;
buf.cursize = 0;
buf.maxsize = 128;
buf.cursize = 0;
strcpy(level, Cmd_Argv(1));
SV_SpawnServer(level);
if (sv.active && cls.state == ca_disconnected)
strcpy(level, Cmd_Argv(1));
SV_SpawnServer(level);
if (sv.active && cls.state == ca_disconnected)
CL_EstablishConnection("local:1");
CL_EstablishConnection("local:1");
strcpy(level, Cmd_Argv(1));
SV_SpawnServer(level);
if (sv.active && cls.state == ca_disconnected)
strcpy(level, Cmd_Argv(1));
SV_SpawnServer(level);
if (sv.active && cls.state == ca_disconnected)
CL_EstablishConnection("local:1");
CL_EstablishConnection("local:1");
strcpy(mapname, sv.name);
SV_SpawnServer(mapname);
if (sv.active && cls.state == ca_disconnected)
strcpy(mapname, sv.name);
SV_SpawnServer(mapname);
if (sv.active && cls.state == ca_disconnected)
CL_EstablishConnection("local:1");
CL_EstablishConnection("local:1");
Con_Print("connect <serveraddress> : connect to a multiplayer game\n");
return;
}
Con_Print("connect <serveraddress> : connect to a multiplayer game\n");
return;
}
- if( sv.active ) {
- SV_VM_Begin();
- CL_EstablishConnection(Cmd_Argv(1));
- SV_VM_End();
- } else {
- CL_EstablishConnection(Cmd_Argv(1));
- }
+ CL_EstablishConnection(Cmd_Argv(1));
for (i = 0;i < NUM_SPAWN_PARMS;i++)
svs.clients[0].spawn_parms[i] = spawn_parms[i];
for (i = 0;i < NUM_SPAWN_PARMS;i++)
svs.clients[0].spawn_parms[i] = spawn_parms[i];
// make sure we're connected to loopback
if (cls.state == ca_disconnected || !(cls.state == ca_connected && cls.netcon != NULL && LHNETADDRESS_GetAddressType(&cls.netcon->peeraddress) == LHNETADDRESSTYPE_LOOP))
CL_EstablishConnection("local:1");
// make sure we're connected to loopback
if (cls.state == ca_disconnected || !(cls.state == ca_connected && cls.netcon != NULL && LHNETADDRESS_GetAddressType(&cls.netcon->peeraddress) == LHNETADDRESSTYPE_LOOP))
CL_EstablishConnection("local:1");
}
//============================================================================
}
//============================================================================
host_client->nametime = sv.time + 5;
// point the string back at updateclient->name to keep it safe
host_client->nametime = sv.time + 5;
// point the string back at updateclient->name to keep it safe
strlcpy (host_client->name, newName, sizeof (host_client->name));
host_client->edict->fields.server->netname = PRVM_SetEngineString(host_client->name);
if (strcmp(host_client->old_name, host_client->name))
strlcpy (host_client->name, newName, sizeof (host_client->name));
host_client->edict->fields.server->netname = PRVM_SetEngineString(host_client->name);
if (strcmp(host_client->old_name, host_client->name))
MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
MSG_WriteString (&sv.reliable_datagram, host_client->name);
}
MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
MSG_WriteString (&sv.reliable_datagram, host_client->name);
}
host_client->nametime = sv.time + 5;
*/
host_client->nametime = sv.time + 5;
*/
// point the string back at updateclient->name to keep it safe
strlcpy (host_client->playermodel, newPath, sizeof (host_client->playermodel));
if( eval_playermodel )
// point the string back at updateclient->name to keep it safe
strlcpy (host_client->playermodel, newPath, sizeof (host_client->playermodel));
if( eval_playermodel )
MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
MSG_WriteString (&sv.reliable_datagram, host_client->playermodel);*/
}
MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
MSG_WriteString (&sv.reliable_datagram, host_client->playermodel);*/
}
host_client->nametime = sv.time + 5;
*/
host_client->nametime = sv.time + 5;
*/
// point the string back at updateclient->name to keep it safe
strlcpy (host_client->playerskin, newPath, sizeof (host_client->playerskin));
if( eval_playerskin )
// point the string back at updateclient->name to keep it safe
strlcpy (host_client->playerskin, newPath, sizeof (host_client->playerskin));
if( eval_playerskin )
MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
MSG_WriteString (&sv.reliable_datagram, host_client->playerskin);*/
}
MSG_WriteByte (&sv.reliable_datagram, host_client - svs.clients);
MSG_WriteString (&sv.reliable_datagram, host_client->playerskin);*/
}
}
void Host_Version_f (void)
}
void Host_Version_f (void)
if (host_client->edict && (f = PRVM_ED_FindFunction ("SV_ChangeTeam")) && (SV_ChangeTeam = (func_t)(f - prog->functions)))
{
Con_DPrint("Calling SV_ChangeTeam\n");
if (host_client->edict && (f = PRVM_ED_FindFunction ("SV_ChangeTeam")) && (SV_ChangeTeam = (func_t)(f - prog->functions)))
{
Con_DPrint("Calling SV_ChangeTeam\n");
MSG_WriteByte (&sv.reliable_datagram, host_client->colors);
}
}
MSG_WriteByte (&sv.reliable_datagram, host_client->colors);
}
}
}
cvar_t cl_rate = {CVAR_SAVE, "_cl_rate", "10000", "internal storage cvar for current rate (changed by rate command)"};
}
cvar_t cl_rate = {CVAR_SAVE, "_cl_rate", "10000", "internal storage cvar for current rate (changed by rate command)"};
prog->globals.server->time = sv.time;
prog->globals.server->self = PRVM_EDICT_TO_PROG(host_client->edict);
PRVM_ExecuteProgram (prog->globals.server->ClientKill, "QC function ClientKill is missing");
prog->globals.server->time = sv.time;
prog->globals.server->self = PRVM_EDICT_TO_PROG(host_client->edict);
PRVM_ExecuteProgram (prog->globals.server->ClientKill, "QC function ClientKill is missing");
if (host_client->edict && (val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_pmodel)))
val->_float = i;
if (host_client->edict && (val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_pmodel)))
val->_float = i;
}
//===========================================================================
}
//===========================================================================
// SZ_Clear (&host_client->netconnection->message);
// run the entrance script
// SZ_Clear (&host_client->netconnection->message);
// run the entrance script
if (sv.loadgame)
{
// loaded games are fully initialized already
if (sv.loadgame)
{
// loaded games are fully initialized already
PRVM_ExecuteProgram (prog->globals.server->PutClientInServer, "QC function PutClientInServer is missing");
}
PRVM_ExecuteProgram (prog->globals.server->PutClientInServer, "QC function PutClientInServer is missing");
}
if (!host_client->netconnection)
return;
if (!host_client->netconnection)
return;
// send time of update
MSG_WriteByte (&host_client->netconnection->message, svc_time);
MSG_WriteFloat (&host_client->netconnection->message, sv.time);
// send time of update
MSG_WriteByte (&host_client->netconnection->message, svc_time);
MSG_WriteFloat (&host_client->netconnection->message, sv.time);
MSG_WriteByte (&host_client->netconnection->message, svc_signonnum);
MSG_WriteByte (&host_client->netconnection->message, 3);
MSG_WriteByte (&host_client->netconnection->message, svc_signonnum);
MSG_WriteByte (&host_client->netconnection->message, 3);
t = Cmd_Argv(1);
v = atoi (Cmd_Argv(2));
t = Cmd_Argv(1);
v = atoi (Cmd_Argv(2));
switch (t[0])
{
case '0':
switch (t[0])
{
case '0':
}
prvm_edict_t *FindViewthing (void)
}
prvm_edict_t *FindViewthing (void)
{
if ((ret = NetConn_ReceivedMessage(host_client->netconnection, data, length)) == 2)
{
{
if ((ret = NetConn_ReceivedMessage(host_client->netconnection, data, length)) == 2)
{
double oldmovetime;
usercmd_t *move = &host_client->cmd;
double oldmovetime;
usercmd_t *move = &host_client->cmd;
oldmovetime = move->time;
// if this move has been applied, clear it, and start accumulating new data
oldmovetime = move->time;
// if this move has been applied, clear it, and start accumulating new data
prog->globals.server->frametime = oldframetime;
}
}
prog->globals.server->frametime = oldframetime;
}
}