mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-20 06:18:11 +00:00
move IsDead to the DestroyableComponent
This commit is contained in:
@@ -227,7 +227,7 @@ void BasicAttackBehavior::DoBehaviorCalculation(BehaviorContext* context, RakNet
|
||||
|
||||
bitStream.Write(armorDamageDealt);
|
||||
bitStream.Write(healthDamageDealt);
|
||||
bitStream.Write(targetEntity->GetIsDead());
|
||||
bitStream.Write(targetEntity->GetComponent<DestroyableComponent>()->GetIsDead());
|
||||
}
|
||||
|
||||
bitStream.Write(successState);
|
||||
|
@@ -116,7 +116,7 @@ void TacArcBehavior::Calculate(BehaviorContext* context, RakNet::BitStream& bitS
|
||||
for (auto validTarget : validTargets) {
|
||||
if (targets.size() >= this->m_maxTargets) break;
|
||||
if (std::find(targets.begin(), targets.end(), validTarget) != targets.end()) continue;
|
||||
if (validTarget->GetIsDead()) continue;
|
||||
if (validTarget->GetComponent<DestroyableComponent>()->GetIsDead()) continue;
|
||||
|
||||
const auto targetPos = validTarget->GetPosition();
|
||||
|
||||
|
Reference in New Issue
Block a user