Open 6AKU66 opened 4 months ago
Right now UpdateWeaponVectors consume measurable amount of CPU when units are not in fight, here what can be done:
for_mt_chunk
void CUnit::UpdateWeaponVectors()
for_mt_chunk(0, activeUnits.size(), [&](const int idx) { auto unit = activeUnits[idx]; unit->UpdateWeaponVectors();
script->HaveAnimations() And another check that checking if unit changed own position.
script->HaveAnimations()
Right now UpdateWeaponVectors consume measurable amount of CPU when units are not in fight, here what can be done:
for_mt_chunk
invoid CUnit::UpdateWeaponVectors()
. Sometimes like this.void CUnit::UpdateWeaponVectors()
script->HaveAnimations()
And another check that checking if unit changed own position.