Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/game/server/tf/bot/tf_bot.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ class CTFBot: public NextBotPlayer< CTFPlayer >, public CGameEventListener
FIRE_IMMUNE = 1<<25, // "" fire
PARACHUTE = 1<<26, // demo/soldier parachute when falling
PROJECTILE_SHIELD = 1<<27, // medic projectile shield
FORCE_DIFFICULTY_BASED_AIM = 1<<28, // force difficulty-based aim (for spy)
};
void SetAttribute( int attributeFlag );
void ClearAttribute( int attributeFlag );
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/tf/bot/tf_bot_body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ float CTFBotBody::GetHeadAimTrackingInterval( void ) const
CTFBot *me = (CTFBot *)GetBot();

// don't let Spies in MvM mode aim too precisely
if ( TFGameRules()->IsMannVsMachineMode() && me->IsPlayerClass( TF_CLASS_SPY ) )
if ( TFGameRules()->IsMannVsMachineMode() && me->IsPlayerClass( TF_CLASS_SPY ) && !me->HasAttribute( CTFBot::FORCE_DIFFICULTY_BASED_AIM ) )
{
return 0.25f;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,10 @@ static bool ParseDynamicAttributes( CTFBot::EventChangeAttributes_t& event, KeyV
{
event.m_attributeFlags |= CTFBot::PROJECTILE_SHIELD;
}
else if ( !Q_stricmp( value, "ForceDifficultyBasedAim" ) )
{
event.m_attributeFlags |= CTFBot::FORCE_DIFFICULTY_BASED_AIM;
}
else
{
Warning( "TFBotSpawner: Invalid attribute '%s'\n", value );
Expand Down
1 change: 1 addition & 0 deletions src/game/server/vscript_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2815,6 +2815,7 @@ DECLARE_SCRIPT_CONST_NAMED( FTFBotAttributeType, "BLAST_IMMUNE", CTFBot::Attribu
DECLARE_SCRIPT_CONST_NAMED( FTFBotAttributeType, "FIRE_IMMUNE", CTFBot::AttributeType::FIRE_IMMUNE )
DECLARE_SCRIPT_CONST_NAMED( FTFBotAttributeType, "PARACHUTE", CTFBot::AttributeType::PARACHUTE )
DECLARE_SCRIPT_CONST_NAMED( FTFBotAttributeType, "PROJECTILE_SHIELD", CTFBot::AttributeType::PROJECTILE_SHIELD )
DECLARE_SCRIPT_CONST_NAMED( FTFBotAttributeType, "FORCE_DIFFICULTY_BASED_AIM", CTFBot::AttributeType::FORCE_DIFFICULTY_BASED_AIM )
REGISTER_SCRIPT_CONST_TABLE( FTFBotAttributeType )

DECLARE_SCRIPT_CONST_TABLE( ETFBotDifficultyType )
Expand Down