]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mvm_cmds.c
optimized vm by using cached local variables instead of accessing prog->
[xonotic/darkplaces.git] / mvm_cmds.c
index 63a798b5974857ea76f96660e290d68f4e4c63a6..9a23640177f038636f3b38109af6426bd6e656fa 100644 (file)
@@ -740,7 +740,7 @@ static void VM_M_copyentity (prvm_prog_t *prog)
        VM_SAFEPARMCOUNT(2,VM_M_copyentity);
        in = PRVM_G_EDICT(OFS_PARM0);
        out = PRVM_G_EDICT(OFS_PARM1);
-       memcpy(out->fields.vp, in->fields.vp, prog->entityfields * 4);
+       memcpy(out->fields.fp, in->fields.fp, prog->entityfields * sizeof(prvm_vec_t));
 }
 
 //#66 vector() getmousepos (EXT_CSQC)
@@ -1396,11 +1396,11 @@ VM_gecko_resize,                                        // #492 void gecko_resize( string name, float w, float h )
 VM_gecko_get_texture_extent,   // #493 vector gecko_get_texture_extent( string name )
 VM_crc16,                                              // #494 float(float caseinsensitive, string s, ...) crc16 = #494 (DP_QC_CRC16)
 VM_cvar_type,                                  // #495 float(string name) cvar_type = #495; (DP_QC_CVAR_TYPE)
-NULL,                                                                  // #496
-NULL,                                                                  // #497
-NULL,                                                                  // #498
-NULL,                                                                  // #499
-NULL,                                                                  // #500
+VM_numentityfields,                            // #496 float() numentityfields = #496; (QP_QC_ENTITYDATA)
+VM_entityfieldname,                            // #497 string(float fieldnum) entityfieldname = #497; (DP_QC_ENTITYDATA)
+VM_entityfieldtype,                            // #498 float(float fieldnum) entityfieldtype = #498; (DP_QC_ENTITYDATA)
+VM_getentityfieldstring,               // #499 string(float fieldnum, entity ent) getentityfieldstring = #499; (DP_QC_ENTITYDATA)
+VM_putentityfieldstring,               // #500 float(float fieldnum, entity ent, string s) putentityfieldstring = #500; (DP_QC_ENTITYDATA)
 NULL,                                                                  // #501
 NULL,                                                                  // #502
 VM_whichpack,                                  // #503 string(string) whichpack = #503;