Incorrect swim speed related to ultra high capacity tanks, analysis and fixes

BelgarelBelgarel Join Date: 2017-07-03 Member: 231570Members, Subnautica Developer
edited September 2017 in Subnautica Bug Reporting
This is a minor bug but easy to fix. UnderwaterMotor.AlterMaxSpeed() is checking the number of /unequipped/ Ultra High Capacity Tanks (TechType.HighCapacityTank) in the player's inventory and giving them a huge penalty to swim speed (1.275 per tank). It's the only tank type this is being done with. It's likely leftover code from when players could carry multiple tanks and swap them in and can be deleted.

To test, it should be very obvious that you're swimming much slower if you add a few of them to your inventory like via "item highcapacitytank 4", but here's a video demonstrating it. At the start, I have one tank equipped and none in my inventory and move fairly normal. After putting 4 unequipped tanks in my inventory I'm moving very slow. Dropping them one at a time increases my swim speed. I have some debugging on-screen to show the penalty the game is attempting to apply (ignoring the minimum penalty) which shows the change as they're removed.



As a wishlist item, it'd be nice to have some sort of UI to see what the swim speed is, like on the equip screen or as a tooltip. I was totally unaware how many things affected swim speed until I started poking around this (I noticed this bug while doing so). I think for most players these mechanics basically don't exist due to lack of awareness which is a shame.

Comments

Sign In or Register to comment.