thombruce / verse

🚀 A universe in progress
Other
8 stars 0 forks source link

Player Health may go negative #111

Closed thombruce closed 9 months ago

thombruce commented 9 months ago

A ludicrous experiment in spawning enemies on a timer brought this to my attention:

image

The player's health may go negative (e.g. taking multiple hits in the same tick) and the player will not despawn; there is effectively no game over.

thombruce commented 9 months ago

Turned out not to be a multiple-hit issue. I'd sensible already used a <= for ship death handling. Instead, the issue was a silent failure of the ship death handling in the case that no adversaries were found (as the player lacks this); I believe that's the case anyway, and so the despawn command was never reached.