Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add calculated weapons data to type data so we dont have to calculate it per unit #251

Open
tweakimp opened this issue Mar 7, 2019 · 0 comments
Assignees

Comments

@tweakimp
Copy link
Contributor

tweakimp commented Mar 7, 2019

In unit.py we currently only take _weapons directly from the unit's type data.
With _weapons, we then calculate can_attack, can_attack_air, can_attack_ground, ground_dps, air_dps, ground_range , air_range and bonus_damage for every unit (so for every single marine, not for the marine in general) in every frame we ask for these properties.

We would save a lot of calls if we calculated these one time for every unit during start and then saved this data in the unit's type data.

@tweakimp tweakimp self-assigned this Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant