Implement Buccaneer Valiant special ability

Adds the ability for the buccaneer valiant to spawn a ship that rams
enemies and smashes them. Next to a script that triggers the ship skill
a few other changes had to be made:
- Force movement behavior server side calculation and sync
- The ship has no physics volume so the FindValidTargets for behaviors
had to be altered to allow ControllablePhysics entities to find entities
within their area. The "target_self" AOE flag has been used to replicate
the old behavior.
This commit is contained in:
Mick Vermeulen
2021-12-11 11:59:29 +01:00
parent 82a1c8a765
commit 833ed8a40d
9 changed files with 114 additions and 32 deletions

View File

@@ -74,7 +74,7 @@ void AreaOfEffectBehavior::Calculate(BehaviorContext* context, RakNet::BitStream
includeFaction = 1;
}
for (auto validTarget : context->GetValidTargets(m_ignoreFaction , includeFaction))
for (auto validTarget : context->GetValidTargets(m_ignoreFaction , includeFaction, m_TargetSelf == 1))
{
auto* entity = EntityManager::Instance()->GetEntity(validTarget);
@@ -155,4 +155,6 @@ void AreaOfEffectBehavior::Load()
this->m_ignoreFaction = GetInt("ignore_faction");
this->m_includeFaction = GetInt("include_faction");
this->m_TargetSelf = GetInt("target_self");
}