From 2dc5c73a24afd505d17ccee2297d033093cf2e40 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 3 Jun 2003 05:18:04 +0000 Subject: [PATCH] fixed bug that used bmodel collision geometry on non-SOLID_BSP entities (thanks to FrikaC for reporting this bug) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3063 d7cf8633-e32d-0410-b094-e92efae38249 --- world.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/world.c b/world.c index 85a53826..3d63db31 100644 --- a/world.c +++ b/world.c @@ -453,17 +453,17 @@ trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t max { int i; trace_t trace; - model_t *model; - - i = ent->v->modelindex; - if ((unsigned int) i >= MAX_MODELS) - Host_Error("SV_ClipMoveToEntity: invalid modelindex\n"); - model = sv.models[i]; - if (i != 0 && model == NULL) - Host_Error("SV_ClipMoveToEntity: invalid modelindex\n"); + model_t *model = NULL; if ((int) ent->v->solid == SOLID_BSP) { + i = ent->v->modelindex; + if ((unsigned int) i >= MAX_MODELS) + Host_Error("SV_ClipMoveToEntity: invalid modelindex\n"); + model = sv.models[i]; + if (i != 0 && model == NULL) + Host_Error("SV_ClipMoveToEntity: invalid modelindex\n"); + Mod_CheckLoaded(model); if (model->type != mod_brush) { -- 2.39.2