From: res Date: Sun, 30 Dec 2007 15:19:26 +0000 (+0000) Subject: Add CSQC ReadEntity to mirror SVQC's WriteEntity. X-Git-Tag: xonotic-v0.1.0preview~2614 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c892c12384aded220f4a488e5d5f9572fb4d12f6;p=xonotic%2Fdarkplaces.git Add CSQC ReadEntity to mirror SVQC's WriteEntity. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7881 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/clvm_cmds.c b/clvm_cmds.c index 4293170c..2403c9a4 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -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