From e16ea21dc8a710237ade8413207f58d403c616a3 Mon Sep 17 00:00:00 2001 From: Joe Ludwig Date: Wed, 17 Jul 2013 18:26:59 -0700 Subject: * 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 --- mp/src/game/server/functorutils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mp/src/game/server/functorutils.h') 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 ); -- cgit v1.2.3