diff options
| author | Joe Ludwig <[email protected]> | 2013-07-17 18:26:59 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-07-17 18:26:59 -0700 |
| commit | e16ea21dc8a710237ade8413207f58d403c616a3 (patch) | |
| tree | 85dcfbda9881e4e022dedafefbc2727e2fd2aa59 /mp/src/game/server/functorutils.h | |
| parent | Merge pull request #36 from AnAkIn1/fogplayerparams_fix (diff) | |
| download | source-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.tar.xz source-sdk-2013-e16ea21dc8a710237ade8413207f58d403c616a3.zip | |
* Added support for building shaders in your mod
* Added nav mesh support
* fixed many warnings and misc bugs
* Fixed the create*projects scripts in mp
* Added a bunch of stuff to .gitignore
Diffstat (limited to 'mp/src/game/server/functorutils.h')
| -rw-r--r-- | mp/src/game/server/functorutils.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mp/src/game/server/functorutils.h b/mp/src/game/server/functorutils.h index 8b4657b2..d07f0597 100644 --- a/mp/src/game/server/functorutils.h +++ b/mp/src/game/server/functorutils.h @@ -5,8 +5,10 @@ #ifndef _FUNCTOR_UTILS_H_
#define _FUNCTOR_UTILS_H_
+#ifdef NEXT_BOT
#include "NextBotInterface.h"
#include "NextBotManager.h"
+#endif // NEXT_BOT
//--------------------------------------------------------------------------------------------------------
/**
@@ -321,12 +323,14 @@ inline bool ForEachActor( Functor &func ) if ( !player->IsConnected() )
continue;
+#ifdef NEXT_BOT
// skip bots - ForEachCombatCharacter will catch them
INextBot *bot = player->MyNextBotPointer();
if ( bot )
{
continue;
}
+#endif // NEXT_BOT
if ( func( player ) == false )
{
@@ -334,8 +338,12 @@ inline bool ForEachActor( Functor &func ) }
}
+#ifdef NEXT_BOT
// iterate all NextBots
return TheNextBots().ForEachCombatCharacter( func );
+#else
+ return true;
+#endif // NEXT_BOT
}
@@ -385,12 +393,14 @@ inline bool ForEachActor( IActorFunctor &func ) if ( !player->IsConnected() )
continue;
+#ifdef NEXT_BOT
// skip bots - ForEachCombatCharacter will catch them
INextBot *bot = dynamic_cast< INextBot * >( player );
if ( bot )
{
continue;
}
+#endif // NEXT_BOT
if ( func( player ) == false )
{
@@ -399,11 +409,13 @@ inline bool ForEachActor( IActorFunctor &func ) }
}
+#ifdef NEXT_BOT
if ( !isComplete )
{
// iterate all NextBots
isComplete = TheNextBots().ForEachCombatCharacter( func );
}
+#endif // NEXT_BOT
func.OnEndIteration( isComplete );
|