]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Add CSQC ReadEntity to mirror SVQC's WriteEntity.
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 30 Dec 2007 15:19:26 +0000 (15:19 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 30 Dec 2007 15:19:26 +0000 (15:19 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7881 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c

index 4293170ca0e732f911b427287e27454c7ff959ac..2403c9a4cfef5d1d458711814c36ec3458f5e386 100644 (file)
@@ -1231,6 +1231,14 @@ static void VM_CL_ReadFloat (void)
        PRVM_G_FLOAT(OFS_RETURN) = MSG_ReadFloat();
 }
 
+static void VM_CL_ReadEntity (void)
+{
+       int ednum;
+       VM_SAFEPARMCOUNT(0, VM_CL_ReadEntity);
+       ednum = MSG_ReadShort();
+       VM_RETURN_EDICT(PRVM_PROG_TO_EDICT(ednum));
+}
+
 //////////////////////////////////////////////////////////
 
 static void VM_CL_makestatic (void)
@@ -3220,7 +3228,7 @@ VM_CL_ReadCoord,                          // #364 float() readcoord (EXT_CSQC)
 VM_CL_ReadAngle,                               // #365 float() readangle (EXT_CSQC)
 VM_CL_ReadString,                              // #366 string() readstring (EXT_CSQC)
 VM_CL_ReadFloat,                               // #367 float() readfloat (EXT_CSQC)
-NULL,                                                  // #368
+VM_CL_ReadEntity,                              // #368 entity() readentity
 NULL,                                                  // #369
 NULL,                                                  // #370
 NULL,                                                  // #371