prvm_prog_t *prog = CLVM_prog;
CSQC_BEGIN
PRVM_clientglobalfloat(time) = cl.time;
- PRVM_clientglobalfloat(cltime) = realtime; // Spike named it that way.
+ PRVM_clientglobalfloat(cltime) = host.realtime; // Spike named it that way.
PRVM_clientglobalfloat(frametime) = frametime;
PRVM_clientglobalfloat(servercommandframe) = cls.servermovesequence;
PRVM_clientglobalfloat(clientcommandframe) = cl.movecmd[0].sequence;
// temporarily so that it can be set by the cvar command,
// and then reprotect it afterwards
int crcflags = csqc_progcrc.flags;
- int sizeflags = csqc_progcrc.flags;
csqc_progcrc.flags &= ~CVAR_READONLY;
csqc_progsize.flags &= ~CVAR_READONLY;
Cmd_ExecuteString(&cmd_client, msg, src_command, true);
- csqc_progcrc.flags = crcflags;
- csqc_progsize.flags = sizeflags;
+ csqc_progcrc.flags = csqc_progsize.flags = crcflags;
return;
}
}
else
{
- Con_DPrintf("Not using buffered \"%s\" (buffered: %p, %d)\n", csprogsfn, cls.caughtcsprogsdata, (int) cls.caughtcsprogsdatasize);
+ Con_DPrintf("Not using buffered \"%s\" (buffered: %p, %d)\n", csprogsfn, (void *)cls.caughtcsprogsdata, (int) cls.caughtcsprogsdatasize);
csprogsdata = FS_LoadFile(csprogsfn, tempmempool, true, &csprogsdatasize);
}
}
{
if (cls.demoplayback)
{
- Con_Warnf("Warning: Your %s is not the same version as the demo was recorded with (CRC/size are %i/%i but should be %i/%i)\n", csqc_progname.string, csprogsdatacrc, (int)csprogsdatasize, requiredcrc, requiredsize);
+ Con_Printf(CON_WARN "Warning: Your %s is not the same version as the demo was recorded with (CRC/size are %i/%i but should be %i/%i)\n", csqc_progname.string, csprogsdatacrc, (int)csprogsdatasize, requiredcrc, requiredsize);
// Mem_Free(csprogsdata);
// return;
// We WANT to continue here, and play the demo with different csprogs!
else
{
Mem_Free(csprogsdata);
- Con_Errorf("Your %s is not the same version as the server (CRC is %i/%i but should be %i/%i)\n", csqc_progname.string, csprogsdatacrc, (int)csprogsdatasize, requiredcrc, requiredsize);
+ Con_Printf(CON_ERROR "Your %s is not the same version as the server (CRC is %i/%i but should be %i/%i)\n", csqc_progname.string, csprogsdatacrc, (int)csprogsdatasize, requiredcrc, requiredsize);
CL_Disconnect();
return;
}
if (requiredcrc >= 0)
{
if (cls.demoplayback)
- Con_Errorf("CL_VM_Init: demo requires CSQC, but \"%s\" wasn't found\n", csqc_progname.string);
+ Con_Printf(CON_ERROR "CL_VM_Init: demo requires CSQC, but \"%s\" wasn't found\n", csqc_progname.string);
else
- Con_Errorf("CL_VM_Init: server requires CSQC, but \"%s\" wasn't found\n", csqc_progname.string);
+ Con_Printf(CON_ERROR "CL_VM_Init: server requires CSQC, but \"%s\" wasn't found\n", csqc_progname.string);
CL_Disconnect();
}
return;
prog->ExecuteProgram(prog, PRVM_clientfunction(CSQC_Init), "QC function CSQC_Init is missing");
// Once CSQC_Init was called, we consider csqc code fully initialized.
- prog->inittime = realtime;
+ prog->inittime = host.realtime;
cl.csqc_loaded = true;