From 9f9e21f1dc158d368500b7d0d58cf97d690ed6ad Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 23 Oct 2022 23:02:16 +0900 Subject: [PATCH] [nq] Relink entities when there model changes This is the fix for the grenade explosion bug. It was rather difficult to track down because *two* explosions are rendered for the one grenade (but that's actually another bug due to the nq/qw merge). It's also correct as changing the model can change the BSP leafs the entity touches. --- nq/source/cl_ents.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nq/source/cl_ents.c b/nq/source/cl_ents.c index 130d1edd7..a5db5d3e6 100644 --- a/nq/source/cl_ents.c +++ b/nq/source/cl_ents.c @@ -242,6 +242,9 @@ CL_RelinkEntities (void) || new->modelindex != old->modelindex) { old->modelindex = new->modelindex; set_entity_model (i, new->modelindex); + if (visibility->efrag) { + R_RemoveEfrags (ent); + } } animation->frame = new->frame; if (SET_TEST_MEMBER (&cl_forcelink, i)