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

High health regeneration performance issues. Health integer overflow possible. #1341

AphidGit opened this issue Nov 4, 2017 · 2 comments


None yet
2 participants
Copy link

commented Nov 4, 2017

When a unit is given a massive amount of strength (esp. in the new patch with the modified regeneration rate), it will cause some major framerate issues, but only while it is visible.

To test:

  • Create a unit (ex. with the map editor) with 10,000,000 hp regeneration.
    While the unit is visible, the framerate will drop significantly (as if a particle effect applies for every 'X' hp of regen), to the point where the game can become unusable.

Integer overflow bug with HP:

  • Units should probably be limited to 100,000,000 STR. Giving them more than 107,374,182 STR will cause a very strange glitch: when the unit is the player's hero, the model will 'freeze' in play. Any action the player tries to undertake (moving, using abilities) will result in the message 'Dead'.

The hero isn't actually really dead though; some things still apply, such as gaining XP, while other things do not. The hero will be stuck at 0 of -2,147,483,635 HP.

To Test: Create a hero with the following stats:

107,374,182 STR, 10 AGI, 10 INT.
Give the hero 1 more strength (e.g. buy an ironwood branch).

To fix this: clamp stats so that an overflow cannot be triggered. A similar problem occurs with intelligence due to mana pool overflow, or AGI where e.g. damage can overflow. Minimum limits should be thus about 100M str, about 150M int, and about 2B agi.


This comment has been minimized.

Copy link

commented Nov 5, 2017

Is there a reason that you think this is a Mac or Linux issue?


This comment has been minimized.

Copy link

commented Nov 6, 2017

Closing as this doesn't seem to be a Mac/Linux thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.