From 9b93f93d4a20fa61c8a9589887f469fd50e46ccd Mon Sep 17 00:00:00 2001 From: res Date: Wed, 2 Jan 2008 01:03:41 +0000 Subject: [PATCH] Fixed flawed comparison in VM_CL_gettagindex that always reported the first precached client model as not precached. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7891 d7cf8633-e32d-0410-b094-e92efae38249 --- clvm_cmds.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clvm_cmds.c b/clvm_cmds.c index 254b4b6c..e21d090d 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -2179,10 +2179,8 @@ static void VM_CL_gettagindex (void) } modelindex = (int)ent->fields.client->modelindex; - if(modelindex < 0) - modelindex = -(modelindex+1); tag_index = 0; - if (modelindex <= 0 || modelindex >= MAX_MODELS) + if (modelindex >= MAX_MODELS || (modelindex <= -MAX_MODELS /* client models */)) Con_DPrintf("gettagindex(entity #%i): null or non-precached model\n", PRVM_NUM_FOR_EDICT(ent)); else { -- 2.39.2