(minor) When getting crushed between a starport and a hub, you can have negative HP
Esnardo opened this issue · 1 comments
This one is kinda rare since it involves having a save where a planet generates so close to a hub that it's startport will intersect the hub within a reasonable timeframe. It also doesn't affect gameplay (all effects clear on respawn), so it's a really low priority unless there's another way to trigger it (maybe you don't need 2 immovable objects?)
Issue: see title
Repro:
- Generate a world where a starport passes through a hub
- get crushed in the gap
- Sometimes your HP bar will show up as negative
V2.0.0
LGK20, Android
For anyone interested in fixing this, it should be easy enough to clamp ship health so that it doesn't go below zero. If it does, then it should just be reset to 0. The code referenced below should be responsible for ship damage:
DestinationSol/engine/src/main/java/org/destinationsol/game/ship/SolShip.java
Lines 450 to 464 in fa2a67e