prvm_prog_t *prog = CLVM_prog;
if(!cl.csqc_loaded)
return;
- CSQC_BEGIN
- VM_ClearTraceGlobals(prog);
- PRVM_clientglobalfloat(trace_networkentity) = 0;
- CSQC_END
+CSQC_BEGIN
+ VM_ClearTraceGlobals(prog);
+ PRVM_clientglobalfloat(trace_networkentity) = 0;
+CSQC_END
}
//[515]: these are required funcs
if(!cl.csqc_loaded)
return false;
- CSQC_BEGIN
- if (!PRVM_clientfunction(CSQC_InputEvent))
- r = false;
- else
- {
- PRVM_clientglobalfloat(time) = cl.time;
- PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
- PRVM_G_FLOAT(OFS_PARM0) = eventtype;
- PRVM_G_FLOAT(OFS_PARM1) = x; // key or x
- PRVM_G_FLOAT(OFS_PARM2) = y; // ascii or y
- prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_InputEvent), "QC function CSQC_InputEvent is missing");
- r = CSQC_RETURNVAL != 0;
- }
- CSQC_END
+CSQC_BEGIN
+ if (!PRVM_clientfunction(CSQC_InputEvent))
+ r = false;
+ else
+ {
+ PRVM_clientglobalfloat(time) = cl.time;
+ PRVM_clientglobaledict(self) = cl.csqc_server2csqcentitynumber[cl.playerentity];
+ PRVM_G_FLOAT(OFS_PARM0) = eventtype;
+ PRVM_G_FLOAT(OFS_PARM1) = x; // key or x
+ PRVM_G_FLOAT(OFS_PARM2) = y; // ascii or y
+ prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_InputEvent), "QC function CSQC_InputEvent is missing");
+ r = CSQC_RETURNVAL != 0;
+ }
+CSQC_END
return r;
}
//Cvar_SetValueQuick(&csqc_progsize, -1);
if(!cl.csqc_loaded)
return;
- CSQC_BEGIN
- if (prog->loaded)
- {
- PRVM_clientglobalfloat(time) = cl.time;
- PRVM_clientglobaledict(self) = 0;
- if (PRVM_clientfunction(CSQC_Shutdown))
- prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Shutdown), "QC function CSQC_Shutdown is missing");
- }
- PRVM_Prog_Reset(prog);
- CSQC_END
+CSQC_BEGIN
+ if (prog->loaded)
+ {
+ PRVM_clientglobalfloat(time) = cl.time;
+ PRVM_clientglobaledict(self) = 0;
+ if (PRVM_clientfunction(CSQC_Shutdown))
+ prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Shutdown), "QC function CSQC_Shutdown is missing");
+ }
+ PRVM_Prog_Reset(prog);
+CSQC_END
Con_DPrint("CSQC ^1unloaded\n");
cl.csqc_loaded = false;
}
if(sv_status_privacy.integer && cmd->source != src_command)
strlcpy(ip, client->netconnection ? "hidden" : "botclient", 48);
else
- strlcpy(ip, (client->netconnection && client->netconnection->address) ? client->netconnection->address : "botclient", 48);
+ strlcpy(ip, (client->netconnection && *client->netconnection->address) ? client->netconnection->address : "botclient", 48);
frags = client->frags;
t1 = (long) time(NULL);
t2 = strtol(s, NULL, 0);
- if(abs(t1 - t2) > rcon_secure_maxdiff.integer)
+ if(labs(t1 - t2) > rcon_secure_maxdiff.integer)
return false;
if(!HMAC_MDFOUR_16BYTES((unsigned char *) mdfourbuf, (unsigned char *) s, slen, (unsigned char *) password, (int)strlen(password)))
// reset reference, but leave commits alone
d->referenceframenum = -1;
for (i = 0;i < d->maxreferenceentities;i++)
+ {
d->referenceentity[i] = defaultstate;
// if this is the server, remove commits
for (i = 0, commit = d->commit;i < MAX_ENTITY_HISTORY;i++, commit++)
commit->numentities = 0;
+ }
found = true;
}
else if (d->referenceframenum == framenum)
VectorCopy(r_shadow_selectedlight->color, color);
radius = r_shadow_selectedlight->radius;
style = r_shadow_selectedlight->style;
- if (r_shadow_selectedlight->cubemapname)
+ if (*r_shadow_selectedlight->cubemapname)
strlcpy(cubemapname, r_shadow_selectedlight->cubemapname, sizeof(cubemapname));
else
cubemapname[0] = 0;
VectorCopy(r_shadow_selectedlight->color, r_shadow_bufferlight.color);
r_shadow_bufferlight.radius = r_shadow_selectedlight->radius;
r_shadow_bufferlight.style = r_shadow_selectedlight->style;
- if (r_shadow_selectedlight->cubemapname)
+ if (*r_shadow_selectedlight->cubemapname)
strlcpy(r_shadow_bufferlight.cubemapname, r_shadow_selectedlight->cubemapname, sizeof(r_shadow_bufferlight.cubemapname));
else
r_shadow_bufferlight.cubemapname[0] = 0;
qboolean TaskQueue_IsDone(taskqueue_task_t *t)
{
- return !t->done != 0;
+ return !!t->done;
}
static void TaskQueue_DistributeTasks(void)