]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix invalid offset spam when r_showbboxes_client is > 0
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 May 2020 14:26:20 +0000 (14:26 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 18 May 2020 14:26:20 +0000 (14:26 +0000)
This checks for server progs before touching viewmodelforclient as it's apparently not a client field.

From Mario (Xonotic)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12535 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index b2b7d6836c55011f4ca748eff7128fb87236d7b5..bc3577bbbae54b97c9e9f7413d7b34b4218f44f0 100644 (file)
@@ -6124,9 +6124,9 @@ static void R_DrawEntityBBoxes(prvm_prog_t *prog)
                if (edict->priv.server->free)
                        continue;
                // exclude the following for now, as they don't live in world coordinate space and can't be solid:
-               if (PRVM_serveredictedict(edict, tag_entity) != 0)
+               if (PRVM_gameedictedict(edict, tag_entity) != 0)
                        continue;
-               if (PRVM_serveredictedict(edict, viewmodelforclient) != 0)
+               if (prog == SVVM_prog && PRVM_serveredictedict(edict, viewmodelforclient) != 0)
                        continue;
                VectorLerp(edict->priv.server->areamins, 0.5f, edict->priv.server->areamaxs, center);
                R_MeshQueue_AddTransparent(TRANSPARENTSORT_DISTANCE, center, R_DrawEntityBBoxes_Callback, (entity_render_t *)NULL, i, (rtlight_t *)prog);