From 688daaa1c8129926b371013f3f5e6214196fb628 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Tue, 5 Oct 2021 00:51:01 +0300 Subject: [PATCH] fix previous commit --- engine/gl_matsysiface.cpp | 9 +++------ game/client/clientmode_shared.cpp | 8 +------- materialsystem/shaderapidx9/shaderdevicedx8.cpp | 4 +--- serverbrowser/CustomGames.cpp | 2 +- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/engine/gl_matsysiface.cpp b/engine/gl_matsysiface.cpp index 0fdef992ae..9bee195163 100644 --- a/engine/gl_matsysiface.cpp +++ b/engine/gl_matsysiface.cpp @@ -966,23 +966,20 @@ void SaveSurfAtCrossHair() } -void DebugDrawLightmapAtCrossHair() +void DebugDrawLightmapAtCrossHair() // Lol { - return; +#if 0 IMaterial *pMaterial; int lightmapPageSize[2]; - if( s_CrossHairSurfID <= (SurfaceHandle_t)0 ) - { + if( !s_CrossHairSurfID ) return; - } materials->GetLightmapPageSize( materialSortInfoArray[MSurf_MaterialSortID( s_CrossHairSurfID )].lightmapPageID, &lightmapPageSize[0], &lightmapPageSize[1] ); pMaterial = MSurf_TexInfo( s_CrossHairSurfID )->material; // pMaterial->GetLowResColorSample( textureS, textureT, baseColor ); DrawLightmapPage( materialSortInfoArray[MSurf_MaterialSortID( s_CrossHairSurfID )].lightmapPageID ); -#if 0 int i; for( i = 0; i < 2; i++ ) { diff --git a/game/client/clientmode_shared.cpp b/game/client/clientmode_shared.cpp index 847a4a2db7..9e62390379 100644 --- a/game/client/clientmode_shared.cpp +++ b/game/client/clientmode_shared.cpp @@ -1134,9 +1134,7 @@ void ClientModeShared::FireGameEvent( IGameEvent *event ) bool bValidTeam = false; if ( (GetLocalTeam() && GetLocalTeam()->GetTeamNumber() == team) ) - { bValidTeam = true; - } //If we're in the spectator team then we should be getting whatever messages the person I'm spectating gets. if ( bValidTeam == false ) @@ -1152,15 +1150,11 @@ void ClientModeShared::FireGameEvent( IGameEvent *event ) } } - if ( team == 0 && GetLocalTeam() > (C_Team*)0 ) - { + if ( team == 0 && GetLocalTeam() ) bValidTeam = false; - } if ( team == 255 ) - { bValidTeam = true; - } if ( bValidTeam == true ) { diff --git a/materialsystem/shaderapidx9/shaderdevicedx8.cpp b/materialsystem/shaderapidx9/shaderdevicedx8.cpp index 5f97525d77..db11d2173b 100644 --- a/materialsystem/shaderapidx9/shaderdevicedx8.cpp +++ b/materialsystem/shaderapidx9/shaderdevicedx8.cpp @@ -619,10 +619,8 @@ bool CShaderDeviceMgrDx8::ComputeCapsFromD3D( HardwareCaps_t *pCaps, int nAdapte if ( pVendorID ) { int nVendorID = V_atoi( pVendorID ); // use V_atoi for hex support - if ( pVendorID > (HardwareCaps_t*)0 ) - { + if ( pVendorID ) ident.VendorId = nVendorID; - } } } diff --git a/serverbrowser/CustomGames.cpp b/serverbrowser/CustomGames.cpp index a4df7a75ad..6ccd33fe86 100644 --- a/serverbrowser/CustomGames.cpp +++ b/serverbrowser/CustomGames.cpp @@ -211,7 +211,7 @@ bool CCustomGames::CheckTagFilter( gameserveritem_t &server ) V_SplitString( m_szTagFilter, ",", TagList ); for ( int i = 0; i < TagList.Count(); i++ ) { - if ( ( Q_strnistr( server.m_szGameTags, TagList[i], MAX_TAG_CHARACTERS ) > (const char*)0 ) == TagsExclude() ) + if ( ( Q_strnistr( server.m_szGameTags, TagList[i], MAX_TAG_CHARACTERS ) ) == TagsExclude() ) { bRetVal = false; break;