Make ExecutingAttack have raw pointer array HitData, instead of a List. This is a very hot segment of code, and removing surrounding abstractions can give us a decent amount of performance.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -138,9 +138,10 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, Creature* targe
|
||||
if (target->IsFainted()) {
|
||||
break;
|
||||
}
|
||||
auto& hit = *(hitIterator++);
|
||||
auto hitType = hit.GetType();
|
||||
auto& hit = hitIterator[hitIndex];
|
||||
uint8_t hitType = hit.GetType();
|
||||
HOOK(ChangeAttackType, targetSource, attack, target, hitIndex, &hitType);
|
||||
hit.SetType(hitType);
|
||||
auto effectiveness = library->GetTypeLibrary()->GetEffectiveness(hitType, target->GetTypes());
|
||||
HOOK(ChangeEffectiveness, attack, attack, target, hitIndex, &effectiveness)
|
||||
hit.SetEffectiveness(effectiveness);
|
||||
|
||||
Reference in New Issue
Block a user