extern cvar_t sv_accelerate;
extern cvar_t sv_idealpitchscale;
extern cvar_t sv_aim;
+ extern cvar_t sv_predict;
Cvar_RegisterVariable (&sv_maxvelocity);
Cvar_RegisterVariable (&sv_gravity);
Cvar_RegisterVariable (&sv_idealpitchscale);
Cvar_RegisterVariable (&sv_aim);
Cvar_RegisterVariable (&sv_nostep);
+ Cvar_RegisterVariable (&sv_predict);
for (i=0 ; i<MAX_MODELS ; i++)
sprintf (localmodels[i], "*%i", i);
if (sv.datagram.cursize > MAX_DATAGRAM-16)
return;
MSG_WriteByte (&sv.datagram, svc_particle);
- MSG_WriteCoord (&sv.datagram, org[0]);
- MSG_WriteCoord (&sv.datagram, org[1]);
- MSG_WriteCoord (&sv.datagram, org[2]);
+ MSG_WriteFloatCoord (&sv.datagram, org[0]);
+ MSG_WriteFloatCoord (&sv.datagram, org[1]);
+ MSG_WriteFloatCoord (&sv.datagram, org[2]);
for (i=0 ; i<3 ; i++)
{
v = dir[i]*16;
MSG_WriteShort (&sv.datagram, channel);
MSG_WriteByte (&sv.datagram, sound_num);
for (i=0 ; i<3 ; i++)
- MSG_WriteCoord (&sv.datagram, entity->v.origin[i]+0.5*(entity->v.mins[i]+entity->v.maxs[i]));
+ MSG_WriteFloatCoord (&sv.datagram, entity->v.origin[i]+0.5*(entity->v.mins[i]+entity->v.maxs[i]));
}
/*
char message[2048];
MSG_WriteByte (&client->message, svc_print);
- sprintf (message, "%c\nDARKPLACES VERSION %4.2f SERVER (%i CRC)", 2, VERSION, pr_crc);
+ sprintf (message, "%c\nDARKPLACES VERSION %4.2f BUILD %i SERVER (%i CRC)", 2, VERSION, buildnumber, pr_crc);
MSG_WriteString (&client->message,message);
MSG_WriteByte (&client->message, svc_serverinfo);
- MSG_WriteLong (&client->message, PROTOCOL_VERSION);
+ MSG_WriteLong (&client->message, DPPROTOCOL_VERSION);
MSG_WriteByte (&client->message, svs.maxclients);
if (!coop.value && deathmatch.value)
else
{
// call the progs to get default spawn parms for the new client
- PR_ExecuteProgram (pr_global_struct->SetNewParms);
+ PR_ExecuteProgram (pr_global_struct->SetNewParms, "QC function SetNewParms is missing");
for (i=0 ; i<NUM_SPAWN_PARMS ; i++)
client->spawn_parms[i] = (&pr_global_struct->parm1)[i];
}
dodelta = FALSE;
if ((int)ent->v.effects & EF_DELTA)
- dodelta = cl.time < client->nextfullupdate[e]; // every half second a full update is forced
+ dodelta = sv.time < client->nextfullupdate[e]; // every half second a full update is forced
if (dodelta)
{
}
else
{
- client->nextfullupdate[e] = cl.time + 0.5;
+ client->nextfullupdate[e] = sv.time + 0.5;
baseline = &ent->baseline;
}
angles[0] = angles[0] * movelerp + ent->stepoldangles[0];
angles[1] = angles[1] * movelerp + ent->stepoldangles[1];
angles[2] = angles[2] * movelerp + ent->stepoldangles[2];
- VectorMA(origin, host_client->ping, ent->v.velocity, origin);
+ VectorMA(origin, host_client->latency, ent->v.velocity, origin);
}
else // copy as they are
{
if (bits & U_COLORMAP) MSG_WriteByte (msg, ent->v.colormap);
if (bits & U_SKIN) MSG_WriteByte (msg, ent->v.skin);
if (bits & U_EFFECTS) MSG_WriteByte (msg, ent->v.effects);
- if (bits & U_ORIGIN1) MSG_WriteCoord (msg, origin[0]);
+ if (bits & U_ORIGIN1) MSG_WriteFloatCoord (msg, origin[0]);
if (bits & U_ANGLE1) MSG_WriteAngle(msg, angles[0]);
- if (bits & U_ORIGIN2) MSG_WriteCoord (msg, origin[1]);
+ if (bits & U_ORIGIN2) MSG_WriteFloatCoord (msg, origin[1]);
if (bits & U_ANGLE2) MSG_WriteAngle(msg, angles[1]);
- if (bits & U_ORIGIN3) MSG_WriteCoord (msg, origin[2]);
+ if (bits & U_ORIGIN3) MSG_WriteFloatCoord (msg, origin[2]);
if (bits & U_ANGLE3) MSG_WriteAngle(msg, angles[2]);
// LordHavoc: new stuff
MSG_WriteByte (msg, ent->v.dmg_save);
MSG_WriteByte (msg, ent->v.dmg_take);
for (i=0 ; i<3 ; i++)
- MSG_WriteCoord (msg, other->v.origin[i] + 0.5*(other->v.mins[i] + other->v.maxs[i]));
+ MSG_WriteFloatCoord (msg, other->v.origin[i] + 0.5*(other->v.mins[i] + other->v.maxs[i]));
ent->v.dmg_take = 0;
ent->v.dmg_save = 0;
SV_DropClient (false); // went to another level
else
{
- if (NET_SendMessage (host_client->netconnection
- , &host_client->message) == -1)
+ if (NET_SendMessage (host_client->netconnection, &host_client->message) == -1)
SV_DropClient (true); // if the message couldn't send, kick off
SZ_Clear (&host_client->message);
host_client->last_message = realtime;
MSG_WriteByte (&sv.signon, svent->baseline.skin);
for (i=0 ; i<3 ; i++)
{
- MSG_WriteCoord(&sv.signon, svent->baseline.origin[i]);
+ MSG_WriteFloatCoord(&sv.signon, svent->baseline.origin[i]);
MSG_WriteAngle(&sv.signon, svent->baseline.angles[i]);
}
}
// call the progs to get default spawn parms for the new client
pr_global_struct->self = EDICT_TO_PROG(host_client->edict);
- PR_ExecuteProgram (pr_global_struct->SetChangeParms);
+ PR_ExecuteProgram (pr_global_struct->SetChangeParms, "QC function SetChangeParms is missing");
for (j=0 ; j<NUM_SPAWN_PARMS ; j++)
host_client->spawn_parms[j] = (&pr_global_struct->parm1)[j];
}