This commit is contained in:
FlaminSarge 2025-12-16 01:19:53 -08:00 committed by GitHub
commit e812794055
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 50 additions and 1 deletions

View File

@ -524,6 +524,8 @@ $Project "Server (TF)"
$File "tf\bot\behavior\tf_bot_melee_attack.h"
$File "tf\bot\behavior\tf_bot_approach_object.cpp"
$File "tf\bot\behavior\tf_bot_approach_object.h"
$File "tf\bot\behavior\tf_bot_freeze_input.cpp"
$File "tf\bot\behavior\tf_bot_freeze_input.h"
$File "tf\bot\behavior\tf_bot_get_health.cpp"
$File "tf\bot\behavior\tf_bot_get_health.h"
$File "tf\bot\behavior\tf_bot_get_ammo.cpp"
@ -541,7 +543,7 @@ $Project "Server (TF)"
$File "tf\bot\behavior\tf_bot_escort.cpp"
$File "tf\bot\behavior\tf_bot_escort.h"
$File "tf\bot\behavior\tf_bot_use_item.cpp"
$File "tf\bot\behavior\tf_bot_use_item.h"
$File "tf\bot\behavior\tf_bot_use_item.h"
$File "tf\bot\behavior\tf_bot_mvm_deploy_bomb.cpp"
$File "tf\bot\behavior\tf_bot_mvm_deploy_bomb.h"

View File

@ -20,6 +20,7 @@
#include "bot/tf_bot_manager.h"
#include "bot/behavior/tf_bot_behavior.h"
#include "bot/behavior/tf_bot_dead.h"
#include "bot/behavior/tf_bot_freeze_input.h"
#include "NextBot/NavMeshEntities/func_nav_prerequisite.h"
#include "bot/behavior/nav_entities/tf_bot_nav_ent_destroy_entity.h"
#include "bot/behavior/nav_entities/tf_bot_nav_ent_move_to.h"
@ -106,6 +107,12 @@ ActionResult< CTFBot > CTFBotMainAction::Update( CTFBot *me, float interval )
return Done( "Not on a playing team" );
}
if ( me->m_Shared.InCond( TF_COND_FREEZE_INPUT ) || me->m_Shared.InCond( TF_COND_HALLOWEEN_THRILLER ) )
{
// frozen - do nothing
return SuspendFor( new CTFBotFreezeInput, "Frozen by TF_COND" );
}
// Should I accept taunt from my partner?
if ( me->FindPartnerTauntInitiator() )
{

View File

@ -0,0 +1,20 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
// tf_bot_freeze_input.cpp
// Don't do anything until the TF_COND_FREEZE_INPUT condition expires
// Community-contributed, June 2025
#include "cbase.h"
#include "bot/tf_bot.h"
#include "bot/behavior/tf_bot_freeze_input.h"
//---------------------------------------------------------------------------------------------
ActionResult< CTFBot > CTFBotFreezeInput::Update( CTFBot *me, float interval )
{
if ( !me->m_Shared.InCond( TF_COND_FREEZE_INPUT ) && !me->m_Shared.InCond( TF_COND_HALLOWEEN_THRILLER ) )
{
return Done( "No longer frozen by TF_COND" );
}
return Continue();
}

View File

@ -0,0 +1,20 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
// tf_bot_freeze_input.h
// Don't do anything until the TF_COND_FREEZE_INPUT condition expires
// Community-contributed, June 2025
#ifndef TF_BOT_FREEZE_INPUT_H
#define TF_BOT_FREEZE_INPUT_H
//-----------------------------------------------------------------------------
class CTFBotFreezeInput : public Action< CTFBot >
{
public:
virtual ActionResult< CTFBot > Update( CTFBot *me, float interval );
virtual const char *GetName( void ) const { return "FreezeInput"; };
};
#endif // TF_BOT_FREEZE_INPUT_H