upload "kind" alien swarm

This commit is contained in:
nillerusr
2023-10-03 17:23:56 +03:00
parent b7bd94c52e
commit 7d3c0d8b5a
4229 changed files with 462900 additions and 495155 deletions
+10 -11
View File
@@ -1,14 +1,14 @@
// FunctorUtils.h
// Useful functors
//========= Copyright Valve Corporation, All rights reserved. ============//
// Author: Michael Booth, August 2005, Copyright 2005 Turtle Rock Studios, Inc.
#ifndef _FUNCTOR_UTILS_H_
#define _FUNCTOR_UTILS_H_
#ifdef NEXT_BOT
#ifdef NEXTBOTS
#include "NextBotInterface.h"
#include "NextBotManager.h"
#endif // NEXT_BOT
#endif
//--------------------------------------------------------------------------------------------------------
/**
@@ -323,14 +323,12 @@ 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 )
{
@@ -338,12 +336,12 @@ inline bool ForEachActor( Functor &func )
}
}
#ifdef NEXT_BOT
// iterate all NextBots
#ifdef NEXTBOTS
return TheNextBots().ForEachCombatCharacter( func );
#else
return true;
#endif // NEXT_BOT
#endif
}
@@ -372,6 +370,7 @@ public:
template <>
inline bool ForEachActor( IActorFunctor &func )
{
#ifdef NEXTBOTS
func.OnBeginIteration();
bool isComplete = true;
@@ -393,14 +392,12 @@ 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 )
{
@@ -409,17 +406,19 @@ inline bool ForEachActor( IActorFunctor &func )
}
}
#ifdef NEXT_BOT
if ( !isComplete )
{
// iterate all NextBots
isComplete = TheNextBots().ForEachCombatCharacter( func );
}
#endif // NEXT_BOT
func.OnEndIteration( isComplete );
return isComplete;
#else
return true;
#endif
}