Files
dota_factory/src/lib/ecs/system/ai/AttackExecutor.cpp
Malte Langkabel 0eb9c97e5d dedupe AttackExecutor and RepairExecutor via executeOrbitAndAssign
The two executors were line-for-line duplicates: orbit the behavior target,
then hand it to the owner's in-range modules. Both now call a templated
executeOrbitAndAssign<Behavior, ModuleComponent>; the view types, iteration
order, and sequence of component writes are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GH8ZMRY3vhxxXcaUxBqxkk
2026-08-02 21:16:15 +02:00

18 lines
452 B
C++

#include "AttackExecutor.h"
#include "AttackBehavior.h"
#include "BehaviorKind.h"
#include "EntityAdmin.h"
#include "OrbitAndAssignExecutor.h"
#include "tracing.h"
#include "WeaponComponent.h"
void AttackExecutor::execute(EntityAdmin& admin)
{
TRACE();
// Orbit the attack target and hand it to every weapon that can reach it
// (REQ-SHP-ORBIT).
executeOrbitAndAssign<AttackBehavior, WeaponComponent>(admin, BehaviorKind::Attack);
}