cvar_t sv_cullentities_trace_delay = {0, "sv_cullentities_trace_delay", "1", "number of seconds until the entity gets actually culled"};
cvar_t sv_cullentities_trace_delay_players = {0, "sv_cullentities_trace_delay_players", "0.2", "number of seconds until the entity gets actually culled if it is a player entity"};
cvar_t sv_cullentities_trace_enlarge = {0, "sv_cullentities_trace_enlarge", "0", "box enlargement for entity culling"};
+cvar_t sv_cullentities_trace_expand = { 0, "sv_cullentities_trace_expand", "0", "box is expanded by this many units for entity culling" };
+cvar_t sv_cullentities_trace_eyejitter = {0, "sv_cullentities_trace_eyejitter", "16", "jitter the eye by this much for each trace"};
cvar_t sv_cullentities_trace_prediction = {0, "sv_cullentities_trace_prediction", "1", "also trace from the predicted player position"};
cvar_t sv_cullentities_trace_prediction_time = {0, "sv_cullentities_trace_prediction_time", "0.2", "how many seconds of prediction to use"};
cvar_t sv_cullentities_trace_entityocclusion = {0, "sv_cullentities_trace_entityocclusion", "0", "also check if doors and other bsp models are in the way"};
cvar_t sv_gameplayfix_unstickentities = {0, "sv_gameplayfix_unstickentities", "1", "hack to check if entities are crossing world collision hull and try to move them to the right position"};
cvar_t sv_gameplayfix_fixedcheckwatertransition = {0, "sv_gameplayfix_fixedcheckwatertransition", "1", "fix two very stupid bugs in SV_CheckWaterTransition when watertype is CONTENTS_EMPTY (the bugs causes waterlevel to be 1 on first frame, -1 on second frame - the fix makes it 0 on both frames)"};
cvar_t sv_gravity = {CVAR_NOTIFY, "sv_gravity","800", "how fast you fall (512 = roughly earth gravity)"};
+cvar_t sv_init_frame_count = {0, "sv_init_frame_count", "2", "number of frames to run to allow everything to settle before letting clients connect"};
cvar_t sv_idealpitchscale = {0, "sv_idealpitchscale","0.8", "how much to look up/down slopes and stairs when not using freelook"};
cvar_t sv_jumpstep = {CVAR_NOTIFY, "sv_jumpstep", "0", "whether you can step up while jumping"};
cvar_t sv_jumpvelocity = {0, "sv_jumpvelocity", "270", "cvar that can be used by QuakeC code for jump velocity"};
Cvar_RegisterVariable (&sv_cullentities_trace_delay);
Cvar_RegisterVariable (&sv_cullentities_trace_delay_players);
Cvar_RegisterVariable (&sv_cullentities_trace_enlarge);
+ Cvar_RegisterVariable (&sv_cullentities_trace_expand);
+ Cvar_RegisterVariable (&sv_cullentities_trace_eyejitter);
Cvar_RegisterVariable (&sv_cullentities_trace_entityocclusion);
Cvar_RegisterVariable (&sv_cullentities_trace_prediction);
Cvar_RegisterVariable (&sv_cullentities_trace_prediction_time);
Cvar_RegisterVariable (&sv_gameplayfix_unstickentities);
Cvar_RegisterVariable (&sv_gameplayfix_fixedcheckwatertransition);
Cvar_RegisterVariable (&sv_gravity);
+ Cvar_RegisterVariable (&sv_init_frame_count);
Cvar_RegisterVariable (&sv_idealpitchscale);
Cvar_RegisterVariable (&sv_jumpstep);
Cvar_RegisterVariable (&sv_jumpvelocity);
Cvar_RegisterVariable (&scratch4);
Cvar_RegisterVariable (&temp1);
- // LordHavoc: Nehahra uses these to pass data around cutscene demos
+ // LadyHavoc: Nehahra uses these to pass data around cutscene demos
Cvar_RegisterVariable (&nehx00);
Cvar_RegisterVariable (&nehx01);
Cvar_RegisterVariable (&nehx02);
==================
*/
-void SV_StartSound (prvm_edict_t *entity, int channel, const char *sample, int volume, float attenuation, qboolean reliable, float speed)
+void SV_StartSound (prvm_edict_t *entity, int channel, const char *sample, int nvolume, float attenuation, qboolean reliable, float speed)
{
prvm_prog_t *prog = SVVM_prog;
sizebuf_t *dest;
dest = (reliable ? &sv.reliable_datagram : &sv.datagram);
- if (volume < 0 || volume > 255)
+ if (nvolume < 0 || nvolume > 255)
{
- Con_Printf ("SV_StartSound: volume = %i\n", volume);
+ Con_Printf ("SV_StartSound: volume = %i\n", nvolume);
return;
}
speed4000 = (int)floor(speed * 4000.0f + 0.5f);
field_mask = 0;
- if (volume != DEFAULT_SOUND_PACKET_VOLUME)
+ if (nvolume != DEFAULT_SOUND_PACKET_VOLUME)
field_mask |= SND_VOLUME;
if (attenuation != DEFAULT_SOUND_PACKET_ATTENUATION)
field_mask |= SND_ATTENUATION;
MSG_WriteByte (dest, svc_sound);
MSG_WriteByte (dest, field_mask);
if (field_mask & SND_VOLUME)
- MSG_WriteByte (dest, volume);
+ MSG_WriteByte (dest, nvolume);
if (field_mask & SND_ATTENUATION)
MSG_WriteByte (dest, (int)(attenuation*64));
if (field_mask & SND_SPEEDUSHORT4000)
==================
*/
-void SV_StartPointSound (vec3_t origin, const char *sample, int volume, float attenuation, float speed)
+void SV_StartPointSound (vec3_t origin, const char *sample, int nvolume, float attenuation, float speed)
{
int sound_num, field_mask, i, speed4000;
- if (volume < 0 || volume > 255)
+ if (nvolume < 0 || nvolume > 255)
{
- Con_Printf ("SV_StartPointSound: volume = %i\n", volume);
+ Con_Printf ("SV_StartPointSound: volume = %i\n", nvolume);
return;
}
speed4000 = (int)(speed * 40.0f);
field_mask = 0;
- if (volume != DEFAULT_SOUND_PACKET_VOLUME)
+ if (nvolume != DEFAULT_SOUND_PACKET_VOLUME)
field_mask |= SND_VOLUME;
if (attenuation != DEFAULT_SOUND_PACKET_ATTENUATION)
field_mask |= SND_ATTENUATION;
MSG_WriteByte (&sv.datagram, svc_sound);
MSG_WriteByte (&sv.datagram, field_mask);
if (field_mask & SND_VOLUME)
- MSG_WriteByte (&sv.datagram, volume);
+ MSG_WriteByte (&sv.datagram, nvolume);
if (field_mask & SND_ATTENUATION)
MSG_WriteByte (&sv.datagram, (int)(attenuation*64));
if (field_mask & SND_SPEEDUSHORT4000)
client->weaponmodel[0] = 0;
client->weaponmodelindex = 0;
- // LordHavoc: clear entityframe tracking
+ // LadyHavoc: clear entityframe tracking
client->latestframenum = 0;
// initialize the movetime, so a speedhack can't make use of the time before this client joined
MSG_WriteString (&client->netconnection->message,message);
SV_StopDemoRecording(client); // to split up demos into different files
- if(sv_autodemo_perclient.integer && client->netconnection)
+ if(sv_autodemo_perclient.integer)
{
char demofile[MAX_OSPATH];
char ipaddress[MAX_QPATH];
- size_t i;
+ size_t j;
// start a new demo file
LHNETADDRESS_ToString(&(client->netconnection->peeraddress), ipaddress, sizeof(ipaddress), true);
- for(i = 0; ipaddress[i]; ++i)
- if(!isalnum(ipaddress[i]))
- ipaddress[i] = '-';
+ for(j = 0; ipaddress[j]; ++j)
+ if(!isalnum(ipaddress[j]))
+ ipaddress[j] = '-';
dpsnprintf (demofile, sizeof(demofile), "%s_%s_%d_%s.dem", Sys_TimeString (sv_autodemo_perclient_nameformat.string), sv.worldbasename, PRVM_NUM_FOR_EDICT(client->edict), ipaddress);
SV_StartDemoRecording(client, demofile, -1);
if(client->sv_demo_file != NULL)
{
- int i;
+ int k;
static char buf[NET_MAXMESSAGE];
sizebuf_t sb;
sb.data = (unsigned char *) buf;
sb.maxsize = sizeof(buf);
- i = 0;
- while(MakeDownloadPacket(sv.csqc_progname, svs.csqc_progdata, sv.csqc_progsize, sv.csqc_progcrc, i++, &sb, sv.protocol))
+ k = 0;
+ while(MakeDownloadPacket(sv.csqc_progname, svs.csqc_progdata, sv.csqc_progsize, sv.csqc_progcrc, k++, &sb, sv.protocol))
SV_WriteDemoMessage(client, &sb, false);
}
if(client->netconnection && client->netconnection->crypto.authenticated)
{
- Con_Printf("%s connection to %s has been established: client is %s@%.*s, I am %.*s@%.*s\n",
+ Con_Printf("%s connection to %s has been established: client is %s@%s%.*s, I am %.*s@%s%.*s\n",
client->netconnection->crypto.use_aes ? "Encrypted" : "Authenticated",
client->netconnection->address,
client->netconnection->crypto.client_idfp[0] ? client->netconnection->crypto.client_idfp : "-",
+ (client->netconnection->crypto.client_issigned || !client->netconnection->crypto.client_keyfp[0]) ? "" : "~",
crypto_keyfp_recommended_length, client->netconnection->crypto.client_keyfp[0] ? client->netconnection->crypto.client_keyfp : "-",
crypto_keyfp_recommended_length, client->netconnection->crypto.server_idfp[0] ? client->netconnection->crypto.server_idfp : "-",
+ (client->netconnection->crypto.server_issigned || !client->netconnection->crypto.server_keyfp[0]) ? "" : "~",
crypto_keyfp_recommended_length, client->netconnection->crypto.server_keyfp[0] ? client->netconnection->crypto.server_keyfp : "-"
);
}
effects = (unsigned)PRVM_serveredictfloat(ent, effects);
// we can omit invisible entities with no effects that are not clients
- // LordHavoc: this could kill tags attached to an invisible entity, I
+ // LadyHavoc: this could kill tags attached to an invisible entity, I
// just hope we never have to support that case
i = (int)PRVM_serveredictfloat(ent, modelindex);
modelindex = (i >= 1 && i < MAX_MODELS && PRVM_serveredictstring(ent, model) && *PRVM_GetString(prog, PRVM_serveredictstring(ent, model)) && sv.models[i]) ? i : 0;
#define MAX_LINEOFSIGHTTRACES 64
-qboolean SV_CanSeeBox(int numtraces, vec_t enlarge, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs)
+qboolean SV_CanSeeBox(int numtraces, vec_t eyejitter, vec_t enlarge, vec_t entboxexpand, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs)
{
prvm_prog_t *prog = SVVM_prog;
float pitchsign;
float alpha;
float starttransformed[3], endtransformed[3];
+ float boxminstransformed[3], boxmaxstransformed[3];
+ float localboxcenter[3], localboxextents[3], localboxmins[3], localboxmaxs[3];
int blocked = 0;
int traceindex;
int originalnumtouchedicts;
dp_model_t *model;
prvm_edict_t *touch;
static prvm_edict_t *touchedicts[MAX_EDICTS];
+ vec3_t eyemins, eyemaxs, start;
vec3_t boxmins, boxmaxs;
vec3_t clipboxmins, clipboxmaxs;
vec3_t endpoints[MAX_LINEOFSIGHTTRACES];
numtraces = min(numtraces, MAX_LINEOFSIGHTTRACES);
+ // jitter the eye location within this box
+ eyemins[0] = eye[0] - eyejitter;
+ eyemaxs[0] = eye[0] + eyejitter;
+ eyemins[1] = eye[1] - eyejitter;
+ eyemaxs[1] = eye[1] + eyejitter;
+ eyemins[2] = eye[2] - eyejitter;
+ eyemaxs[2] = eye[2] + eyejitter;
// expand the box a little
- boxmins[0] = (enlarge+1) * entboxmins[0] - enlarge * entboxmaxs[0];
- boxmaxs[0] = (enlarge+1) * entboxmaxs[0] - enlarge * entboxmins[0];
- boxmins[1] = (enlarge+1) * entboxmins[1] - enlarge * entboxmaxs[1];
- boxmaxs[1] = (enlarge+1) * entboxmaxs[1] - enlarge * entboxmins[1];
- boxmins[2] = (enlarge+1) * entboxmins[2] - enlarge * entboxmaxs[2];
- boxmaxs[2] = (enlarge+1) * entboxmaxs[2] - enlarge * entboxmins[2];
+ boxmins[0] = (enlarge+1) * entboxmins[0] - enlarge * entboxmaxs[0] - entboxexpand;
+ boxmaxs[0] = (enlarge+1) * entboxmaxs[0] - enlarge * entboxmins[0] + entboxexpand;
+ boxmins[1] = (enlarge+1) * entboxmins[1] - enlarge * entboxmaxs[1] - entboxexpand;
+ boxmaxs[1] = (enlarge+1) * entboxmaxs[1] - enlarge * entboxmins[1] + entboxexpand;
+ boxmins[2] = (enlarge+1) * entboxmins[2] - enlarge * entboxmaxs[2] - entboxexpand;
+ boxmaxs[2] = (enlarge+1) * entboxmaxs[2] - enlarge * entboxmins[2] + entboxexpand;
VectorMAM(0.5f, boxmins, 0.5f, boxmaxs, endpoints[0]);
for (traceindex = 1;traceindex < numtraces;traceindex++)
VectorSet(endpoints[traceindex], lhrandom(boxmins[0], boxmaxs[0]), lhrandom(boxmins[1], boxmaxs[1]), lhrandom(boxmins[2], boxmaxs[2]));
// calculate sweep box for the entire swarm of traces
- VectorCopy(eye, clipboxmins);
- VectorCopy(eye, clipboxmaxs);
+ VectorCopy(eyemins, clipboxmins);
+ VectorCopy(eyemaxs, clipboxmaxs);
for (traceindex = 0;traceindex < numtraces;traceindex++)
{
clipboxmins[0] = min(clipboxmins[0], endpoints[traceindex][0]);
for (traceindex = 0;traceindex < numtraces;traceindex++)
{
+ VectorSet(start, lhrandom(eyemins[0], eyemaxs[0]), lhrandom(eyemins[1], eyemaxs[1]), lhrandom(eyemins[2], eyemaxs[2]));
// check world occlusion
if (sv.worldmodel && sv.worldmodel->brush.TraceLineOfSight)
- if (!sv.worldmodel->brush.TraceLineOfSight(sv.worldmodel, eye, endpoints[traceindex]))
+ if (!sv.worldmodel->brush.TraceLineOfSight(sv.worldmodel, start, endpoints[traceindex], boxmins, boxmaxs))
continue;
for (touchindex = 0;touchindex < numtouchedicts;touchindex++)
{
Matrix4x4_CreateFromQuakeEntity(&matrix, PRVM_serveredictvector(touch, origin)[0], PRVM_serveredictvector(touch, origin)[1], PRVM_serveredictvector(touch, origin)[2], pitchsign * PRVM_serveredictvector(touch, angles)[0], PRVM_serveredictvector(touch, angles)[1], PRVM_serveredictvector(touch, angles)[2], 1);
Matrix4x4_Invert_Simple(&imatrix, &matrix);
// see if the ray hits this entity
- Matrix4x4_Transform(&imatrix, eye, starttransformed);
+ Matrix4x4_Transform(&imatrix, start, starttransformed);
Matrix4x4_Transform(&imatrix, endpoints[traceindex], endtransformed);
- if (!model->brush.TraceLineOfSight(model, starttransformed, endtransformed))
+ Matrix4x4_Transform(&imatrix, boxmins, boxminstransformed);
+ Matrix4x4_Transform(&imatrix, boxmaxs, boxmaxstransformed);
+ // transform the AABB to local space
+ VectorMAM(0.5f, boxminstransformed, 0.5f, boxmaxstransformed, localboxcenter);
+ localboxextents[0] = fabs(boxmaxstransformed[0] - localboxcenter[0]);
+ localboxextents[1] = fabs(boxmaxstransformed[1] - localboxcenter[1]);
+ localboxextents[2] = fabs(boxmaxstransformed[2] - localboxcenter[2]);
+ localboxmins[0] = localboxcenter[0] - localboxextents[0];
+ localboxmins[1] = localboxcenter[1] - localboxextents[1];
+ localboxmins[2] = localboxcenter[2] - localboxextents[2];
+ localboxmaxs[0] = localboxcenter[0] + localboxextents[0];
+ localboxmaxs[1] = localboxcenter[1] + localboxextents[1];
+ localboxmaxs[2] = localboxcenter[2] + localboxextents[2];
+ if (!model->brush.TraceLineOfSight(model, starttransformed, endtransformed, localboxmins, localboxmaxs))
{
blocked++;
break;
return;
if (s->effects & EF_NODRAW)
return;
- // LordHavoc: only send entities with a model or important effects
+ // LadyHavoc: only send entities with a model or important effects
if (!s->modelindex && s->specialvisibilityradius == 0)
return;
}
// or not seen by random tracelines
- if (sv_cullentities_trace.integer && !isbmodel && sv.worldmodel->brush.TraceLineOfSight && !r_trippy.integer)
+ if (sv_cullentities_trace.integer && !isbmodel && sv.worldmodel && sv.worldmodel->brush.TraceLineOfSight && !r_trippy.integer)
{
int samples =
s->number <= svs.maxclients
{
int eyeindex;
for (eyeindex = 0;eyeindex < sv.writeentitiestoclient_numeyes;eyeindex++)
- if(SV_CanSeeBox(samples, enlarge, sv.writeentitiestoclient_eyes[eyeindex], ed->priv.server->cullmins, ed->priv.server->cullmaxs))
+ if(SV_CanSeeBox(samples, sv_cullentities_trace_eyejitter.value, enlarge, sv_cullentities_trace_expand.value, sv.writeentitiestoclient_eyes[eyeindex], ed->priv.server->cullmins, ed->priv.server->cullmaxs))
break;
if(eyeindex < sv.writeentitiestoclient_numeyes)
svs.clients[sv.writeentitiestoclient_clientnumber].visibletime[s->number] =
for(k = 0; k < sv.writeentitiestoclient_numeyes; ++k)
if(eye_levels[k] <= MAX_EYE_RECURSION)
{
- if(SV_CanSeeBox(sv_cullentities_trace_samples.integer, sv_cullentities_trace_enlarge.value, sv.writeentitiestoclient_eyes[k], mi, ma))
+ if(SV_CanSeeBox(sv_cullentities_trace_samples.integer, sv_cullentities_trace_eyejitter.value, sv_cullentities_trace_enlarge.value, sv_cullentities_trace_expand.value, sv.writeentitiestoclient_eyes[k], mi, ma))
{
eye_levels[sv.writeentitiestoclient_numeyes] = eye_levels[k] + 1;
VectorCopy(camera_origins[j], sv.writeentitiestoclient_eyes[sv.writeentitiestoclient_numeyes]);
sv.writeentitiestoclient_numeyes = 0;
// get eye location
- sv.writeentitiestoclient_cliententitynumber = PRVM_EDICT_TO_PROG(clent); // LordHavoc: for comparison purposes
+ sv.writeentitiestoclient_cliententitynumber = PRVM_EDICT_TO_PROG(clent); // LadyHavoc: for comparison purposes
camera = PRVM_EDICT_NUM( client->clientcamera );
VectorAdd(PRVM_serveredictvector(camera, origin), PRVM_serveredictvector(clent, view_ofs), eye);
sv.writeentitiestoclient_pvsbytes = 0;
vec_t predtime = bound(0, host_client->ping, sv_cullentities_trace_prediction_time.value);
vec3_t predeye;
VectorMA(eye, predtime, PRVM_serveredictvector(camera, velocity), predeye);
- if (SV_CanSeeBox(1, 0, eye, predeye, predeye))
+ if (SV_CanSeeBox(1, 0, 0, 0, eye, predeye, predeye))
{
VectorCopy(predeye, sv.writeentitiestoclient_eyes[sv.writeentitiestoclient_numeyes]);
sv.writeentitiestoclient_numeyes++;
if (name == NULL)
name = "";
// always point the string back at host_client->name to keep it safe
- strlcpy (host_client->name, name, sizeof (host_client->name));
+ //strlcpy (host_client->name, name, sizeof (host_client->name));
+ if (name != host_client->name) // prevent buffer overlap SIGABRT on Mac OSX
+ strlcpy (host_client->name, name, sizeof (host_client->name));
PRVM_serveredictstring(host_client->edict, netname) = PRVM_SetEngineString(prog, host_client->name);
if (strcmp(host_client->old_name, host_client->name))
{
if (model == NULL)
model = "";
// always point the string back at host_client->name to keep it safe
- strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
+ //strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
+ if (model != host_client->playermodel) // prevent buffer overlap SIGABRT on Mac OSX
+ strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
PRVM_serveredictstring(host_client->edict, playermodel) = PRVM_SetEngineString(prog, host_client->playermodel);
// NEXUIZ_PLAYERSKIN
if (skin == NULL)
skin = "";
// always point the string back at host_client->name to keep it safe
- strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
+ //strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
+ if (skin != host_client->playerskin) // prevent buffer overlap SIGABRT on Mac OSX
+ strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
PRVM_serveredictstring(host_client->edict, playerskin) = PRVM_SetEngineString(prog, host_client->playerskin);
// TODO: add an extension name for this [1/17/2008 Black]
int i, entnum, large;
prvm_edict_t *svent;
- // LordHavoc: clear *all* baselines (not just active ones)
+ // LadyHavoc: clear *all* baselines (not just active ones)
for (entnum = 0;entnum < prog->max_edicts;entnum++)
{
// get the current server version
svent = PRVM_EDICT_NUM(entnum);
- // LordHavoc: always clear state values, whether the entity is in use or not
+ // LadyHavoc: always clear state values, whether the entity is in use or not
svent->priv.server->baseline = defaultstate;
if (svent->priv.server->free)
//
if (coop.integer)
Cvar_SetValue ("deathmatch", 0);
- // LordHavoc: it can be useful to have skills outside the range 0-3...
+ // LadyHavoc: it can be useful to have skills outside the range 0-3...
//current_skill = bound(0, (int)(skill.value + 0.5), 3);
//Cvar_SetValue ("skill", (float)current_skill);
current_skill = (int)(skill.value + 0.5);
PRVM_ED_LoadFromFile(prog, sv.worldmodel->brush.entities);
- // LordHavoc: clear world angles (to fix e3m3.bsp)
+ // LadyHavoc: clear world angles (to fix e3m3.bsp)
VectorClear(PRVM_serveredictvector(prog->edicts, angles));
// all setup is completed, any further precache statements are errors
-// sv.state = ss_active; // LordHavoc: workaround for svc_precache bug
+// sv.state = ss_active; // LadyHavoc: workaround for svc_precache bug
prog->allowworldwrites = false;
// run two frames to allow everything to settle
sv.time = 1.0001;
- for (i = 0;i < 2;i++)
+ for (i = 0;i < sv_init_frame_count.integer;i++)
{
sv.frametime = 0.1;
SV_Physics ();
}
+ // Once all init frames have been run, we consider svqc code fully initialized.
+ prog->inittime = realtime;
+
if (cls.state == ca_dedicated)
Mod_PurgeUnused();
if (sv.protocol == PROTOCOL_QUAKE || sv.protocol == PROTOCOL_QUAKEDP || sv.protocol == PROTOCOL_NEHAHRAMOVIE || sv.protocol == PROTOCOL_NEHAHRABJP || sv.protocol == PROTOCOL_NEHAHRABJP2 || sv.protocol == PROTOCOL_NEHAHRABJP3)
SV_CreateBaseline ();
- sv.state = ss_active; // LordHavoc: workaround for svc_precache bug
+ sv.state = ss_active; // LadyHavoc: workaround for svc_precache bug
// send serverinfo to all connected clients, and set up botclients coming back from a level change
for (i = 0, host_client = svs.clients;i < svs.maxclients;i++, host_client++)
static void SVVM_init_edict(prvm_prog_t *prog, prvm_edict_t *e)
{
- // LordHavoc: for consistency set these here
+ // LadyHavoc: for consistency set these here
int num = PRVM_NUM_FOR_EDICT(e) - 1;
e->priv.server->move = false; // don't move on first frame
PRVM_serveredictstring(e, crypto_idfp) = PRVM_SetEngineString(prog, svs.clients[num].netconnection->crypto.client_idfp);
else
PRVM_serveredictstring(e, crypto_idfp) = 0;
+ PRVM_serveredictfloat(e, crypto_idfp_signed) = (svs.clients[num].netconnection != NULL && svs.clients[num].netconnection->crypto.authenticated && svs.clients[num].netconnection->crypto.client_issigned);
if(svs.clients[num].netconnection != NULL && svs.clients[num].netconnection->crypto.authenticated && svs.clients[num].netconnection->crypto.client_keyfp[0])
PRVM_serveredictstring(e, crypto_keyfp) = PRVM_SetEngineString(prog, svs.clients[num].netconnection->crypto.client_keyfp);
else
// PRVM_ED_FindGlobalOffset_FromStruct(globalvars_t, SetChangeParms);
}
else
- Con_DPrintf("%s: %s system vars have been modified (CRC %i != engine %i), will not load in other engines", prog->name, sv_progs.string, prog->progs_crc, PROGHEADER_CRC);
+ Con_DPrintf("%s: %s system vars have been modified (CRC %i != engine %i), will not load in other engines\n", prog->name, sv_progs.string, prog->progs_crc, PROGHEADER_CRC);
// OP_STATE is always supported on server because we add fields/globals for it
prog->flag |= PRVM_OP_STATE;
if(advancetime > 0)
{
- offset = sv_timer + (Sys_DirtyTime() - sv_realtime); // LordHavoc: FIXME: I don't understand this line
+ offset = sv_timer + (Sys_DirtyTime() - sv_realtime); // LadyHavoc: FIXME: I don't understand this line
++svs.perf_acc_offset_samples;
svs.perf_acc_offset += offset;
svs.perf_acc_offset_squared += offset * offset;