BurnySc2 / sc2-planner

MIT License
50 stars 13 forks source link

Init larva timer in game tick #44

Closed Dusoleil closed 2 years ago

Dusoleil commented 2 years ago

Initializing the larva timer in the constructor bases it on game frame 0, which causes a bug for every hatch after the first. We can check if it is uninitialized in the game tick and set it based on the current frame. We also need to give a single larva if there aren't any because hatches spawn with one larva (except for the first which spawns with 3). Initializing the larva count in the constructor also causes a weird bug that I couldn't figure out, so I'm also initializing it in the game tick.

Signed-off-by: dusoleil howcansocksbereal@gmail.com

netlify[bot] commented 2 years ago

Deploy Preview for sc2-planner ready!

Name Link
Latest commit 0922aae7ed051c20c2e0d9043058d1c62799e3e8
Latest deploy log https://app.netlify.com/sites/sc2-planner/deploys/6253a4a3c332890009406fdb
Deploy Preview https://deploy-preview-44--sc2-planner.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.