]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mvm_cmds.c
abort ANY movetype_walk move once a touch function moved the player
[xonotic/darkplaces.git] / mvm_cmds.c
index 4e909a3ba411468541783b6369c43dac505d09cb..f5976ac68bf100f3aa44022a43162b58b5dd00a1 100644 (file)
@@ -747,22 +747,6 @@ void VM_M_WriteEntity (void)
        MSG_WriteShort (VM_M_WriteDest(), PRVM_G_EDICTNUM(OFS_PARM0));
 }
 
-//string(void) getextresponse = #624; // returns the next extResponse packet that was sent to this client
-void VM_M_getextresponse (void)
-{
-       VM_SAFEPARMCOUNT(0,VM_argv);
-
-       if (net_extresponse_count <= 0)
-               PRVM_G_INT(OFS_RETURN) = OFS_NULL;
-       else
-       {
-               int first;
-               --net_extresponse_count;
-               first = (net_extresponse_last + NET_EXTRESPONSE_MAX - net_extresponse_count) % NET_EXTRESPONSE_MAX;
-               PRVM_G_INT(OFS_RETURN) = PRVM_SetEngineString(net_extresponse[first]);
-       }
-}
-
 /*
 =================
 VM_M_copyentity
@@ -794,6 +778,13 @@ static void VM_M_getmousepos(void)
                VectorSet(PRVM_G_VECTOR(OFS_RETURN), in_mouse_x * vid_conwidth.integer / vid.width, in_mouse_y * vid_conheight.integer / vid.height, 0);
 }
 
+//#349 float() isdemo (EXT_CSQC)
+static void VM_M_isdemo (void)
+{
+       VM_SAFEPARMCOUNT(0, VM_M_isdemo);
+       PRVM_G_FLOAT(OFS_RETURN) = cls.demoplayback;
+}
+
 prvm_builtin_t vm_m_builtins[] = {
 NULL,                                                                  //   #0 NULL function (not callable)
 VM_checkextension,                             //   #1
@@ -1171,7 +1162,7 @@ NULL,                                                                     // #345
 NULL,                                                                  // #346
 NULL,                                                                  // #347
 NULL,                                                                  // #348
-NULL,                                                                  // #349
+VM_M_isdemo,                                                           // #349
 NULL,                                                                  // #350
 NULL,                                                                  // #351
 NULL,                                                                  // #352
@@ -1446,7 +1437,7 @@ VM_M_refreshserverlist,                   // #620 void refreshhostcache(void)
 VM_M_getserverlistnumber,              // #621 float gethostcachenumber(float fld, float hostnr)
 VM_M_getserverlistindexforkey,// #622 float gethostcacheindexforkey(string key)
 VM_M_addwantedserverlistkey,   // #623 void addwantedhostcachekey(string key)
-VM_M_getextresponse,                   // #624 string getextresponse(void)
+VM_getextresponse,                             // #624 string getextresponse(void)
 VM_netaddress_resolve           // #625 string netaddress_resolve(string, float)
 };