Make it build in Debugbuilds and only include sourcehook.h where needed

This commit is contained in:
Daniel Gibson 2018-08-27 22:15:30 +02:00
parent bf931218cc
commit cdcb02b26e
3 changed files with 31 additions and 36 deletions

View file

@ -82,14 +82,6 @@ class idThread;
class idEditEntities;
class idLocationEntity;
#ifdef _DENTONMOD
//============================================================================
// Adding header here for global use of source hook. - JC Denton
//============================================================================
#include "../sourcehook/sourcehook.h"
//============================================================================
#endif
extern const int NUM_RENDER_PORTAL_BITS;
void gameError( const char *fmt, ... );

View file

@ -37,10 +37,13 @@ If you have questions concerning this license or the applicable additional terms
#include "PlayerView.h"
#ifdef _DENTONMOD
#include "../sourcehook/sourcehook.h"
extern SourceHook::ISourceHook *g_SHPtr;
extern int g_PLID;
SH_DECL_HOOK2_void( idCmdSystem, BufferCommandText, SH_NOATTRIB, 0, cmdExecution_t, const char * );
#endif
static int MakePowerOfTwo( int num ) {
@ -811,36 +814,36 @@ idPlayerView::dnPostProcessManager Class Definitions - JC Denton
*/
idPlayerView::dnPostProcessManager::dnPostProcessManager():
m_imageCurrentRender ( "_currentRender" ),
m_imageCurrentRender8x8DownScaled ( "_RTtoTextureScaled64x" ),
m_imageLuminance64x64 ( "_luminanceTexture64x64" ),
m_imageluminance4x4 ( "_luminanceTexture4x4" ),
m_imageAdaptedLuminance1x1 ( "_adaptedLuminance" ),
m_imageBloom ( "_bloomImage" ),
m_imageHalo ( "_haloImage" ),
m_imageCookedMath ( "_cookedMath" ),
m_matCookMath_pass1 ( declManager->FindMaterial( "postprocess/cookMath_pass1" ) ),
m_matCookMath_pass2 ( declManager->FindMaterial( "postprocess/cookMath_pass2" ) ),
m_matCookMath_pass3 ( declManager->FindMaterial( "postprocess/cookMath_pass3" ) ),
m_imageCurrentRender ( "_currentRender" ),
m_imageCurrentRender8x8DownScaled ( "_RTtoTextureScaled64x" ),
m_imageLuminance64x64 ( "_luminanceTexture64x64" ),
m_imageluminance4x4 ( "_luminanceTexture4x4" ),
m_imageAdaptedLuminance1x1 ( "_adaptedLuminance" ),
m_imageBloom ( "_bloomImage" ),
m_imageHalo ( "_haloImage" ),
m_imageCookedMath ( "_cookedMath" ),
m_matCookMath_pass1 ( declManager->FindMaterial( "postprocess/cookMath_pass1" ) ),
m_matCookMath_pass2 ( declManager->FindMaterial( "postprocess/cookMath_pass2" ) ),
m_matCookMath_pass3 ( declManager->FindMaterial( "postprocess/cookMath_pass3" ) ),
m_matAvgLuminance64x ( declManager->FindMaterial( "postprocess/averageLum64" ) ),
m_matAvgLumSample4x4 ( declManager->FindMaterial( "postprocess/averageLum4" ) ),
m_matAdaptLuminance ( declManager->FindMaterial( "postprocess/adaptLum" ) ),
m_matBrightPass ( declManager->FindMaterial( "postprocess/brightPassOptimized" ) ),
m_matGaussBlurX ( declManager->FindMaterial( "postprocess/blurx" ) ),
m_matGaussBlurY ( declManager->FindMaterial( "postprocess/blury" ) ),
m_matHalo ( declManager->FindMaterial( "postprocess/halo" ) ),
m_matGaussBlurXHalo ( declManager->FindMaterial( "postprocess/blurx_halo" ) ),
m_matGaussBlurYHalo ( declManager->FindMaterial( "postprocess/blury_halo" ) ),
//m_matFinalScenePass ( declManager->FindMaterial( "postprocess/finalScenePass" ) ),
m_matFinalScenePass ( declManager->FindMaterial( "postprocess/finalScenePassOptimized" ) ),
m_matAvgLuminance64x ( declManager->FindMaterial( "postprocess/averageLum64" ) ),
m_matAvgLumSample4x4 ( declManager->FindMaterial( "postprocess/averageLum4" ) ),
m_matAdaptLuminance ( declManager->FindMaterial( "postprocess/adaptLum" ) ),
m_matBrightPass ( declManager->FindMaterial( "postprocess/brightPassOptimized" ) ),
m_matGaussBlurX ( declManager->FindMaterial( "postprocess/blurx" ) ),
m_matGaussBlurY ( declManager->FindMaterial( "postprocess/blury" ) ),
m_matHalo ( declManager->FindMaterial( "postprocess/halo" ) ),
m_matGaussBlurXHalo ( declManager->FindMaterial( "postprocess/blurx_halo" ) ),
m_matGaussBlurYHalo ( declManager->FindMaterial( "postprocess/blury_halo" ) ),
//m_matFinalScenePass ( declManager->FindMaterial( "postprocess/finalScenePass" ) ),
m_matFinalScenePass ( declManager->FindMaterial( "postprocess/finalScenePassOptimized" ) ),
m_matCookVignette ( declManager->FindMaterial( "postprocess/cookVignette" ) ),
m_matCookVignette ( declManager->FindMaterial( "postprocess/cookVignette" ) ),
// Materials for debugging intermediate textures
m_matDecodedLumTexture64x64 ( declManager->FindMaterial( "postprocess/decode_luminanceTexture64x64" ) ),
m_matDecodedLumTexture4x4 ( declManager->FindMaterial( "postprocess/decode_luminanceTexture4x4" ) ),
m_matDecodedAdaptLuminance ( declManager->FindMaterial( "postprocess/decode_adaptedLuminance" ) )
// Materials for debugging intermediate textures
m_matDecodedLumTexture64x64 ( declManager->FindMaterial( "postprocess/decode_luminanceTexture64x64" ) ),
m_matDecodedLumTexture4x4 ( declManager->FindMaterial( "postprocess/decode_luminanceTexture4x4" ) ),
m_matDecodedAdaptLuminance ( declManager->FindMaterial( "postprocess/decode_adaptedLuminance" ) )
{
m_iScreenHeight = m_iScreenWidth = 0;

View file

@ -2710,7 +2710,7 @@ void idBotNode::Event_EvaluateConditions( void ) { //true if one of them is veri
idThread::ReturnInt( true ); return;
}
assert( ownerBot );
assert( ownerBot.IsValid() );
currentOwner = ownerBot.GetEntity();