[nq] Don't delete player entity if no model set

The model gets unset during intermission and deleting the entity breaks
the intermission camera. This doesn't really feel right, but it does fix
the intermission camera. Really, the whole entity linking thing and
camera control needs a cleanup (and merging between nq and qw).
This commit is contained in:
Bill Currie 2023-12-19 21:33:19 +09:00
parent 45a11bcc68
commit 10451fac0d

View file

@ -205,10 +205,13 @@ CL_RelinkEntities (void)
// if the object wasn't included in the last packet, or the model
// has been removed, remove the entity
if (cl_msgtime[i] != cl.mtime[0] || !new->modelindex) {
if (Entity_Valid (ent)) {
Scene_DestroyEntity (cl_world.scene, ent);
// don't delete the player entity
if (i != cl.viewentity) {
if (Entity_Valid (ent)) {
Scene_DestroyEntity (cl_world.scene, ent);
}
continue;
}
continue;
}
if (!Entity_Valid (ent)) {