Skip to content

Commit 7386d0d

Browse files
committed
disable query cache jobs
1 parent e915a4d commit 7386d0d

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

src/game/server/NextBot/NextBotVisionInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ bool IVision::IsLineOfSightClear( const Vector &pos ) const
710710
//------------------------------------------------------------------------------------------
711711
bool IVision::IsLineOfSightClearToEntity( const CBaseEntity *subject, Vector *visibleSpot ) const
712712
{
713-
#ifdef TERROR
713+
#if SUPPORT_QUERY_CACHE
714714
// TODO: Integration querycache & its dependencies
715715

716716
VPROF_INCREMENT_COUNTER( "IVision::IsLineOfSightClearToEntity", 1 );

src/game/shared/basecombatcharacter_shared.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ bool CBaseCombatCharacter::IsLineOfSightClear( const Vector &pos, LineOfSightChe
699699
{
700700

701701
// use the query cache unless it causes problems
702-
#if defined(GAME_DLL) && defined(TERROR)
702+
#if defined(GAME_DLL) && SUPPORT_QUERY_CACHE
703703
return IsLineOfSightBetweenTwoEntitiesClear( const_cast<CBaseCombatCharacter *>(this), EOFFSET_MODE_EYEPOSITION,
704704
entityToIgnore, EOFFSET_MODE_WORLDSPACE_CENTER,
705705
entityToIgnore, COLLISION_GROUP_NONE,

src/game/shared/querycache.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// $NoKeywords: $
66
//
77
//=============================================================================//
8+
#if SUPPORT_QUERY_CACHE
89
#include "cbase.h"
910
#include "querycache.h"
1011
#include "tier0/vprof.h"
@@ -338,6 +339,25 @@ CON_COMMAND( sv_querycache_stats, "Display status of the query cache (client onl
338339
s_nNumCacheQueries, s_nNumCacheMisses, s_VictimList.Count(),
339340
s_SuccessfulSpeculatives, s_WastedSpeculativeUpdates );
340341
}
342+
#else
343+
void UpdateQueryCache( void )
344+
{
345+
}
341346

347+
void InvalidateQueryCache( void )
348+
{
349+
}
342350

343-
351+
bool IsLineOfSightBetweenTwoEntitiesClear( CBaseEntity *pSrcEntity,
352+
EEntityOffsetMode_t nSrcOffsetMode,
353+
CBaseEntity *pDestEntity,
354+
EEntityOffsetMode_t nDestOffsetMode,
355+
CBaseEntity *pSkipEntity,
356+
int nCollisionGroup,
357+
unsigned int nTraceMask,
358+
ShouldHitFunc_t pTraceFilterCallback,
359+
float flMinimumUpdateInterval )
360+
{
361+
return false;
362+
}
363+
#endif

src/game/shared/querycache.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
#endif
1212

1313
#include "tier0/platform.h"
14+
15+
#if defined(TERROR)
16+
#define SUPPORT_QUERY_CACHE 1
17+
#else
18+
#define SUPPORT_QUERY_CACHE 0
19+
#endif
20+
21+
#if SUPPORT_QUERY_CACHE
22+
1423
#include "mathlib/vector.h"
1524

1625
// this system provides several piece of functionality to ai or other systems which wish to do
@@ -75,7 +84,7 @@ struct QueryCacheEntry_t
7584

7685
};
7786

78-
87+
#endif
7988

8089
bool IsLineOfSightBetweenTwoEntitiesClear( CBaseEntity *pSrcEntity,
8190
EEntityOffsetMode_t nSrcOffsetMode,

0 commit comments

Comments
 (0)