]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Backport some minor fixes from master to ease transition testing Mario/minor_fixes
authorMario <mario.mario@y7mail.com>
Sat, 7 Sep 2024 19:36:49 +0000 (05:36 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 7 Sep 2024 19:36:49 +0000 (05:36 +1000)
gl_rmain.c
sv_main.c

index 7b2c7ac6f95677930af4cf7c6ce79a352df1eeda..5b39c61f30f3ef2ded8b9415ff08c60b91c5bcef 100644 (file)
@@ -12415,7 +12415,8 @@ void R_DrawModelSurfaces(entity_render_t *ent, qboolean skysurfaces, qboolean wr
                int updated = 0;
                for (j = model->firstmodelsurface, endj = model->firstmodelsurface + model->nummodelsurfaces;j < endj;j++)
                {
-                       if (update[j])
+                       // Update brush entities even if not visible otherwise they'll render solid black.
+                       if (update[j] && (r_refdef.viewcache.world_surfacevisible[j] || ent != r_refdef.scene.worldentity))
                        {
                                updated++;
                                R_BuildLightMap(ent, surfaces + j);
index dd0d404d8974948654bfb7753338100979c30c46..6f91213390dd6c39f28e685382de2edf17976506 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1346,7 +1346,7 @@ static qboolean SV_PrepareEntityForSending (prvm_edict_t *ent, entity_state_t *c
        if (f)
                cs->effects |= ((unsigned int)f & 0xff) << 24;
 
-       if (PRVM_serveredictfloat(ent, movetype) == MOVETYPE_STEP)
+       if (PRVM_serveredictfloat(ent, movetype) == MOVETYPE_STEP || ((int)PRVM_serveredictfloat(ent, flags) & FL_MONSTER))
                cs->flags |= RENDER_STEP;
        if (cs->number != sv.writeentitiestoclient_cliententitynumber && (cs->effects & EF_LOWPRECISION) && cs->origin[0] >= -32768 && cs->origin[1] >= -32768 && cs->origin[2] >= -32768 && cs->origin[0] <= 32767 && cs->origin[1] <= 32767 && cs->origin[2] <= 32767)
                cs->flags |= RENDER_LOWPRECISION;