]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
DP_QC_EXTRESPONSEPACKET - getextresponse() function now also in csqc and svqc (same...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Apr 2009 13:56:55 +0000 (13:56 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 17 Apr 2009 13:56:55 +0000 (13:56 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8932 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c
mvm_cmds.c
prvm_cmds.c
prvm_cmds.h
svvm_cmds.c

index 20646da1d93091074bd73477fae14662d46a0b12..a8028c33c572f042d89ce6fee6b0af84cf2dc0b0 100644 (file)
@@ -3696,8 +3696,101 @@ NULL,                                                   // #527
 NULL,                                                  // #528
 NULL,                                                  // #529
 NULL,                                                  // #530
-NULL,                                  // #531
+NULL,                                                  // #531
 NULL,                                                  // #532
+NULL,                                                  // #533
+NULL,                                                  // #534
+NULL,                                                  // #535
+NULL,                                                  // #536
+NULL,                                                  // #537
+NULL,                                                  // #538
+NULL,                                                  // #539
+NULL,                                                  // #540
+NULL,                                                  // #541
+NULL,                                                  // #542
+NULL,                                                  // #543
+NULL,                                                  // #544
+NULL,                                                  // #545
+NULL,                                                  // #546
+NULL,                                                  // #547
+NULL,                                                  // #548
+NULL,                                                  // #549
+NULL,                                                  // #550
+NULL,                                                  // #551
+NULL,                                                  // #552
+NULL,                                                  // #553
+NULL,                                                  // #554
+NULL,                                                  // #555
+NULL,                                                  // #556
+NULL,                                                  // #557
+NULL,                                                  // #558
+NULL,                                                  // #559
+NULL,                                                  // #560
+NULL,                                                  // #561
+NULL,                                                  // #562
+NULL,                                                  // #563
+NULL,                                                  // #564
+NULL,                                                  // #565
+NULL,                                                  // #566
+NULL,                                                  // #567
+NULL,                                                  // #568
+NULL,                                                  // #569
+NULL,                                                  // #570
+NULL,                                                  // #571
+NULL,                                                  // #572
+NULL,                                                  // #573
+NULL,                                                  // #574
+NULL,                                                  // #575
+NULL,                                                  // #576
+NULL,                                                  // #577
+NULL,                                                  // #578
+NULL,                                                  // #579
+NULL,                                                  // #580
+NULL,                                                  // #581
+NULL,                                                  // #582
+NULL,                                                  // #583
+NULL,                                                  // #584
+NULL,                                                  // #585
+NULL,                                                  // #586
+NULL,                                                  // #587
+NULL,                                                  // #588
+NULL,                                                  // #589
+NULL,                                                  // #590
+NULL,                                                  // #591
+NULL,                                                  // #592
+NULL,                                                  // #593
+NULL,                                                  // #594
+NULL,                                                  // #595
+NULL,                                                  // #596
+NULL,                                                  // #597
+NULL,                                                  // #598
+NULL,                                                  // #599
+NULL,                                                  // #600
+NULL,                                                  // #601
+NULL,                                                  // #602
+NULL,                                                  // #603
+NULL,                                                  // #604
+NULL,                                                  // #605
+NULL,                                                  // #606
+NULL,                                                  // #607
+NULL,                                                  // #608
+NULL,                                                  // #609
+NULL,                                                  // #610
+NULL,                                                  // #611
+NULL,                                                  // #612
+NULL,                                                  // #613
+NULL,                                                  // #614
+NULL,                                                  // #615
+NULL,                                                  // #616
+NULL,                                                  // #617
+NULL,                                                  // #618
+NULL,                                                  // #619
+NULL,                                                  // #620
+NULL,                                                  // #621
+NULL,                                                  // #622
+NULL,                                                  // #623
+VM_getextresponse,                             // #624 string getextresponse(void)
+NULL,                                                  // #625
 };
 
 const int vm_cl_numbuiltins = sizeof(vm_cl_builtins) / sizeof(prvm_builtin_t);
index 4e909a3ba411468541783b6369c43dac505d09cb..7c1c97d011fdb633e2c4022aca9bc2b8b42bb726 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
@@ -1446,7 +1430,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)
 };
 
index c1be177c09848e343e02748396319cbabc23541b..267cee53a39360e6f42c2d7b883aea978862767f 100644 (file)
@@ -5236,3 +5236,19 @@ void VM_netaddress_resolve (void)
        else
                PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString("");
 }
+
+//string(void) getextresponse = #624; // returns the next extResponse packet that was sent to this client
+void VM_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]);
+       }
+}
index b0ad650a566cf4e0e564981052e625a8b3f4cbcc..a7826eace608dc5a83f01bb25046808370ea7055 100644 (file)
@@ -440,3 +440,5 @@ void VM_argv_end_index (void);
 
 void VM_buf_cvarlist(void);
 void VM_cvar_description(void);
+
+void VM_getextresponse (void);
index bb689358c7f1357c97da7a9c915f61f554a58882..05979415c3c8d7d076dc10ff2dd3c1f76f88e11b 100644 (file)
@@ -71,6 +71,7 @@ char *vm_sv_extensions =
 "DP_QC_EDICT_NUM "
 "DP_QC_ENTITYDATA "
 "DP_QC_ETOS "
+"DP_QC_EXTRESPONSEPACKET "
 "DP_QC_FINDCHAIN "
 "DP_QC_FINDCHAIN_TOFIELD "
 "DP_QC_FINDCHAINFLAGS "
@@ -3615,6 +3616,99 @@ NULL,                                                    // #529
 NULL,                                                  // #530
 VM_SV_setpause,                                        // #531 void(float pause) setpause = #531;
 NULL,                                                  // #532
+NULL,                                                  // #533
+NULL,                                                  // #534
+NULL,                                                  // #535
+NULL,                                                  // #536
+NULL,                                                  // #537
+NULL,                                                  // #538
+NULL,                                                  // #539
+NULL,                                                  // #540
+NULL,                                                  // #541
+NULL,                                                  // #542
+NULL,                                                  // #543
+NULL,                                                  // #544
+NULL,                                                  // #545
+NULL,                                                  // #546
+NULL,                                                  // #547
+NULL,                                                  // #548
+NULL,                                                  // #549
+NULL,                                                  // #550
+NULL,                                                  // #551
+NULL,                                                  // #552
+NULL,                                                  // #553
+NULL,                                                  // #554
+NULL,                                                  // #555
+NULL,                                                  // #556
+NULL,                                                  // #557
+NULL,                                                  // #558
+NULL,                                                  // #559
+NULL,                                                  // #560
+NULL,                                                  // #561
+NULL,                                                  // #562
+NULL,                                                  // #563
+NULL,                                                  // #564
+NULL,                                                  // #565
+NULL,                                                  // #566
+NULL,                                                  // #567
+NULL,                                                  // #568
+NULL,                                                  // #569
+NULL,                                                  // #570
+NULL,                                                  // #571
+NULL,                                                  // #572
+NULL,                                                  // #573
+NULL,                                                  // #574
+NULL,                                                  // #575
+NULL,                                                  // #576
+NULL,                                                  // #577
+NULL,                                                  // #578
+NULL,                                                  // #579
+NULL,                                                  // #580
+NULL,                                                  // #581
+NULL,                                                  // #582
+NULL,                                                  // #583
+NULL,                                                  // #584
+NULL,                                                  // #585
+NULL,                                                  // #586
+NULL,                                                  // #587
+NULL,                                                  // #588
+NULL,                                                  // #589
+NULL,                                                  // #590
+NULL,                                                  // #591
+NULL,                                                  // #592
+NULL,                                                  // #593
+NULL,                                                  // #594
+NULL,                                                  // #595
+NULL,                                                  // #596
+NULL,                                                  // #597
+NULL,                                                  // #598
+NULL,                                                  // #599
+NULL,                                                  // #600
+NULL,                                                  // #601
+NULL,                                                  // #602
+NULL,                                                  // #603
+NULL,                                                  // #604
+NULL,                                                  // #605
+NULL,                                                  // #606
+NULL,                                                  // #607
+NULL,                                                  // #608
+NULL,                                                  // #609
+NULL,                                                  // #610
+NULL,                                                  // #611
+NULL,                                                  // #612
+NULL,                                                  // #613
+NULL,                                                  // #614
+NULL,                                                  // #615
+NULL,                                                  // #616
+NULL,                                                  // #617
+NULL,                                                  // #618
+NULL,                                                  // #619
+NULL,                                                  // #620
+NULL,                                                  // #621
+NULL,                                                  // #622
+NULL,                                                  // #623
+VM_getextresponse,                             // #624 string getextresponse(void)
+NULL,                                                  // #625
 };
 
 const int vm_sv_numbuiltins = sizeof(vm_sv_builtins) / sizeof(prvm_builtin_t);