From: res Date: Wed, 2 Jan 2008 01:03:41 +0000 (+0000) Subject: Fixed flawed comparison in VM_CL_gettagindex that always reported the first precached... X-Git-Tag: xonotic-v0.1.0preview~2604 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9b93f93d4a20fa61c8a9589887f469fd50e46ccd;p=xonotic%2Fdarkplaces.git 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 --- 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 {