From c892c12384aded220f4a488e5d5f9572fb4d12f6 Mon Sep 17 00:00:00 2001 From: res Date: Sun, 30 Dec 2007 15:19:26 +0000 Subject: [PATCH] Add CSQC ReadEntity to mirror SVQC's WriteEntity. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7881 d7cf8633-e32d-0410-b094-e92efae38249 --- clvm_cmds.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.39.2