]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
DP_QC_NUM_FOR_EDICT extension implemented by Blub
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 16:34:09 +0000 (16:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2008 16:34:09 +0000 (16:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8149 d7cf8633-e32d-0410-b094-e92efae38249

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

index 415b3dae8f2552863b4b746ca54134b9d012b356..08c0e59f5b21a3546664a475df514e184c518075 100644 (file)
@@ -3375,7 +3375,7 @@ NULL,                                                     // #508
 NULL,                                                  // #509
 VM_uri_escape,                                 // #510 string(string in) uri_escape = #510;
 VM_uri_unescape,                               // #511 string(string in) uri_unescape = #511;
-NULL,                                                  // #512
+VM_etof,                                       // #512 float(entity ent) num_for_edict = #512 (DP_QC_NUM_FOR_EDICT)
 NULL,                                                  // #513
 NULL,                                                  // #514
 NULL,                                                  // #515
index 05f50f9be814f6efbf6634c21a5121405e5996d4..91d45e2d321415f18437641b1003d3089762130a 100644 (file)
@@ -1300,7 +1300,7 @@ NULL,                                                                     // #508
 NULL,                                                                  // #509
 VM_uri_escape,                                 // #510 string(string in) uri_escape = #510;
 VM_uri_unescape,                               // #511 string(string in) uri_unescape = #511;
-NULL,                                                                  // #512
+VM_etof,                                       // #512 float(entity ent) num_for_edict = #512 (DP_QC_NUM_FOR_EDICT)
 NULL,                                                                  // #513
 NULL,                                                                  // #514
 NULL,                                                                  // #515
index 0fde71812850062ce879be6672a94be9ce39388e..367fe96bab210e070d503d4f768406857cd5e104 100644 (file)
@@ -668,6 +668,19 @@ void VM_ftoe(void)
        PRVM_G_INT(OFS_RETURN) = ent;
 }
 
+/*
+========================
+VM_etof
+
+float etof(entity ent)
+========================
+*/
+void VM_etof(void)
+{
+       VM_SAFEPARMCOUNT(1, VM_etof);
+       PRVM_G_FLOAT(OFS_RETURN) = PRVM_G_EDICTNUM(OFS_PARM0);
+}
+
 /*
 =========
 VM_strftime
index b523e84f81237687ef10798397ae9027b5d00dad..88d0767c308966c172031f161dbc4def2b1143ba 100644 (file)
@@ -415,3 +415,5 @@ void VM_Cmd_Reset(void);
 
 void VM_uri_escape (void);
 void VM_uri_unescape (void);
+
+void VM_etof (void);
index e2d1de3b6f16d46af2f0319214118709f17024b8..ecdd3ef426561c171279b86d928b7a363f4c185e 100644 (file)
@@ -154,6 +154,7 @@ char *vm_sv_extensions =
 "DP_GECKO_SUPPORT "
 "DP_QC_GETSURFACEPOINTATTRIBUTE "
 "DP_QC_URI_ESCAPE "
+"DP_QC_NUM_FOR_EDICT "
 ;
 
 /*
@@ -3362,7 +3363,7 @@ NULL,                                                     // #508
 NULL,                                                  // #509
 VM_uri_escape,                                 // #510 string(string in) uri_escape = #510;
 VM_uri_unescape,                               // #511 string(string in) uri_unescape = #511;
-NULL,                                                  // #512
+VM_etof,                                       // #512 float(entity ent) num_for_edict = #512 (DP_QC_NUM_FOR_EDICT)
 NULL,                                                  // #513
 NULL,                                                  // #514
 NULL,                                                  // #515