NULL, // #519
VM_keynumtostring, // #520 string keynumtostring(float keynum)
VM_findkeysforcommand, // #521 string findkeysforcommand(string command)
+NULL, // #522
+NULL, // #523
+NULL, // #524
+NULL, // #525
+NULL, // #526
+NULL, // #527
+NULL, // #528
+NULL, // #529
+NULL, // #530
+NULL, // #531
+NULL, // #532
};
const int vm_cl_numbuiltins = sizeof(vm_cl_builtins) / sizeof(prvm_builtin_t);
// send all messages to the clients
SV_SendClientMessages();
+
+ if (sv.paused == 1 && realtime > sv.pausedstart && sv.pausedstart > 0) {
+ prog->globals.generic[OFS_PARM0] = realtime - sv.pausedstart;
+ PRVM_ExecuteProgram(prog->funcoffsets.SV_PausedTic, "QC function SV_PausedTic is missing");
+ }
// end the server VM frame
SV_VM_End();
func_t GameCommand; // any
func_t SV_Shutdown; // ssqc
func_t URI_Get_Callback; // any
+ func_t SV_PausedTic; //ssqc
// menu qc only uses some functions, nothing else
func_t m_draw; // mqc
prog->funcoffsets.GameCommand = PRVM_ED_FindFunctionOffset("GameCommand");
prog->funcoffsets.SV_Shutdown = PRVM_ED_FindFunctionOffset("SV_Shutdown");
prog->funcoffsets.URI_Get_Callback = PRVM_ED_FindFunctionOffset("URI_Get_Callback");
+ prog->funcoffsets.SV_PausedTic = PRVM_ED_FindFunctionOffset("SV_PausedTic");
prog->globaloffsets.SV_InitCmd = PRVM_ED_FindGlobalOffset("SV_InitCmd");
prog->globaloffsets.self = PRVM_ED_FindGlobalOffset("self");
prog->globaloffsets.time = PRVM_ED_FindGlobalOffset("time");
"PRYDON_CLIENTCURSOR "
"TENEBRAE_GFX_DLIGHTS "
"TW_SV_STEPCONTROL "
+"ZQ_PAUSE "
//"EXT_CSQC " // not ready yet
;
SV_FlushBroadcastMessages();
}
+//PF_setpause, // void(float pause) setpause = #531;
+static void VM_SV_setpause(void) {
+ int pauseValue;
+ pauseValue = (int)PRVM_G_FLOAT(OFS_PARM0);
+ if (pauseValue != 0) { //pause the game
+ sv.paused = 1;
+ sv.pausedstart = Sys_DoubleTime();
+ } else { //disable pause, in case it was enabled
+ if (sv.paused != 0) {
+ sv.paused = 0;
+ sv.pausedstart = 0;
+ }
+ }
+ // send notification to all clients
+ MSG_WriteByte(&sv.reliable_datagram, svc_setpause);
+ MSG_WriteByte(&sv.reliable_datagram, sv.paused);
+}
+
prvm_builtin_t vm_sv_builtins[] = {
NULL, // #0 NULL function (not callable) (QUAKE)
VM_makevectors, // #1 void(vector ang) makevectors (QUAKE)
VM_buf_cvarlist, // #517 void(float buf, string prefix, string antiprefix) buf_cvarlist = #517; (DP_QC_STRINGBUFFERS_CVARLIST)
VM_cvar_description, // #518 float(string name) cvar_description = #518; (DP_QC_CVAR_DESCRIPTION)
NULL, // #519
+NULL, // #520
+NULL, // #521
+NULL, // #522
+NULL, // #523
+NULL, // #524
+NULL, // #525
+NULL, // #526
+NULL, // #527
+NULL, // #528
+NULL, // #529
+NULL, // #530
+VM_SV_setpause, // #531 void(float pause) setpause = #531;
+NULL, // #532
};
const int vm_sv_numbuiltins = sizeof(vm_sv_builtins) / sizeof(prvm_builtin_t);