Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Author Topic: Fleet Velocity is not capped correctly, causing issues with Terrain.  (Read 547 times)

Lukas04

  • Admiral
  • *****
  • Posts: 717
    • View Profile

Currently, as far as i can tell from my own playtesting, the fleet burn during slow-moving is not capped correctly.
If to say, the max burn for slow-moving is at 4, it is possible that the velocity gets past 4, like 4.1, 4.2, or 4.5.
This, as far as my playtesting goes, can happen if theres a lot of acceleration within one single frame.

This may not sound like much of an issue, but CampaignFleet.getCurrBurnLevel() returns a rounded value of the fleets currently acceleration.
This means at 4.5, it returns 5. The issue with this is, that this will cause it to fail checks on terrain, like Hyperspace storms, where despite slow-moving, you still get hit.

With one exception this doesnt happen in vanilla, but it can very quickly happen in modded enviroments that increase the fleets acceleration stat.
If you combine this with the players FPS being low, i.e around 30, even just a 50% acceleration boost to the fleet can cause the player to get hit by hyperspace storms, as the high "amount" value multiplied with the acceleration starts returning higher numbers in just a single frame.

How to Reproduce
This can be reproduced in vanilla with the Emergency Burn ability, since it has an even more extreme 4x acceleration multiplier.
Simply Hold S, activate Emergency Burn, and try moving through Hyperspace Storms. They should now hit despite being slow moving.
This is essentialy not really an issue in vanilla, because you will never combine those two commands, but should help bugfixing this issue since it is quite am annoying issue for some mods.
« Last Edit: May 25, 2025, 07:39:08 PM by Lukas04 »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26087
    • View Profile

Thank you for the detailed report! Should be fixed for the next release; there was an issue with the speed cap not being applied during certain frames and if the acceleration during one frame was enough to take it to the next burn level, that's when this bug would have a visible effect.
Logged

Lukas04

  • Admiral
  • *****
  • Posts: 717
    • View Profile

Thank you for the detailed report! Should be fixed for the next release; there was an issue with the speed cap not being applied during certain frames and if the acceleration during one frame was enough to take it to the next burn level, that's when this bug would have a visible effect.

Thank you very much! Got unlucky enough to have this happen in combination with two of my mods (My skill rework having skills that increase fleet maneuverability, and in another mod there being terrain that boosts acceleration but also has storms within). Will be glad to no longer get reports of people getting damage from those, though i implemented a temporary fix for my own terrain since i can replace the isMovingSlowly method myself.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26087
    • View Profile

Glad you have a workaround in the meantime!
Logged