From 8ed8d264813166ca5d2184f0e8f48ace036a7e92 Mon Sep 17 00:00:00 2001 From: myT <> Date: Tue, 4 Apr 2023 22:42:24 +0200 Subject: [PATCH] removed the R_SetPVSCulling extension reverted 7e0de354c2b219236ffaeaea35c87114d23ffd44 the mod can feed a different area mask to force drawing everything --- code/client/cl_cgame.cpp | 5 ----- code/qcommon/cg_public.h | 3 +-- code/renderer/tr_init.cpp | 8 -------- code/renderer/tr_local.h | 2 -- code/renderer/tr_public.h | 3 --- code/renderer/tr_world.cpp | 8 +------- 6 files changed, 2 insertions(+), 27 deletions(-) diff --git a/code/client/cl_cgame.cpp b/code/client/cl_cgame.cpp index 4046333..97acc6a 100644 --- a/code/client/cl_cgame.cpp +++ b/code/client/cl_cgame.cpp @@ -356,7 +356,6 @@ static qbool CL_CG_GetValue( char* value, int valueSize, const char* key ) { "trap_CNQ3_NDP_StartVideo", CG_EXT_NDP_STARTVIDEO }, { "trap_CNQ3_NDP_StopVideo", CG_EXT_NDP_STOPVIDEO }, { "trap_CNQ3_R_RenderScene", CG_EXT_R_RENDERSCENE }, - { "trap_CNQ3_R_SetPVSCulling", CG_EXT_R_SETPVSCULLING }, // commands { "screenshotnc", 1 }, { "screenshotncJPEG", 1 }, @@ -709,10 +708,6 @@ static intptr_t CL_CgameSystemCalls( intptr_t *args ) re.RenderScene( VMA(1), args[2] ); return 0; - case CG_EXT_R_SETPVSCULLING: - re.SetPVSCulling( (qbool)args[1] ); - return 0; - default: Com_Error( ERR_DROP, "Bad cgame system trap: %i", args[0] ); } diff --git a/code/qcommon/cg_public.h b/code/qcommon/cg_public.h index 089582d..88144f8 100644 --- a/code/qcommon/cg_public.h +++ b/code/qcommon/cg_public.h @@ -202,8 +202,7 @@ typedef enum { CG_EXT_NDP_READUNTIL, CG_EXT_NDP_STARTVIDEO, CG_EXT_NDP_STOPVIDEO, - CG_EXT_R_RENDERSCENE, - CG_EXT_R_SETPVSCULLING + CG_EXT_R_RENDERSCENE } cgameImport_t; diff --git a/code/renderer/tr_init.cpp b/code/renderer/tr_init.cpp index 8e9b625..82cbbfe 100644 --- a/code/renderer/tr_init.cpp +++ b/code/renderer/tr_init.cpp @@ -683,12 +683,6 @@ static qbool RE_IsDepthClampEnabled() } -static void RE_SetPVSCulling( qbool enable ) -{ - tr.drawEntireMap = !enable; -} - - const refexport_t* GetRefAPI( const refimport_t* rimp ) { static refexport_t re; @@ -742,7 +736,5 @@ const refexport_t* GetRefAPI( const refimport_t* rimp ) re.DepthClamp = RE_IsDepthClampEnabled; - re.SetPVSCulling = RE_SetPVSCulling; - return &re; } diff --git a/code/renderer/tr_local.h b/code/renderer/tr_local.h index 74ebd16..177c91a 100644 --- a/code/renderer/tr_local.h +++ b/code/renderer/tr_local.h @@ -936,8 +936,6 @@ typedef struct { float mipFilter[4]; // only used by the GPU generators qbool worldSurface; // is the currently added draw surface a world surface? - - qbool drawEntireMap; } trGlobals_t; extern backEndState_t backEnd; diff --git a/code/renderer/tr_public.h b/code/renderer/tr_public.h index a39525f..e5422f7 100644 --- a/code/renderer/tr_public.h +++ b/code/renderer/tr_public.h @@ -170,9 +170,6 @@ typedef struct { // is depth clamping enabled? qbool (*DepthClamp)(); - - // qfalse will force drawing the entire map - void (*SetPVSCulling)( qbool enable ); } refexport_t; // diff --git a/code/renderer/tr_world.cpp b/code/renderer/tr_world.cpp index abae9c8..183e890 100644 --- a/code/renderer/tr_world.cpp +++ b/code/renderer/tr_world.cpp @@ -512,12 +512,6 @@ static void R_MarkLeaves() return; } - // when playing a demo on a different map, the area masks might not match - // it's safest to ignore the demo's area mask and mark all nodes as visible - if ( tr.drawEntireMap ) { - tr.refdef.areamaskModified = qtrue; - } - // current viewcluster leaf = R_PointInLeaf( tr.viewParms.pvsOrigin ); cluster = leaf->cluster; @@ -534,7 +528,7 @@ static void R_MarkLeaves() tr.visCount++; tr.viewCluster = cluster; - if ( r_novis->integer || tr.viewCluster == -1 || tr.drawEntireMap ) { + if ( r_novis->integer || tr.viewCluster == -1 ) { for ( i = 0; i < tr.world->numnodes; ++i ) { if (tr.world->nodes[i].contents != CONTENTS_SOLID) { tr.world->nodes[i].visframe = tr.visCount;