branchrust_reboot/main/Submarinecancel
258 Commits over 61 Days - 0.18cph!
Make moonpool water plane convex, so that subs can detect it
Stability edit for centre of mass changes
Allow duo sub passenger to wield items
Don't allow pushing subs if not grounded
Improve submarine stability
- Renamed PoolVehicle to IPoolVehicle.
- Made the submarines an IPoolVehicle.
- Removed the wake on trigger enter, IPoolVehicle already covers it.
- Made BaseBoat an IPoolVehicle as well, and removed it from Kayak (it's a BaseBoat subclass).
Detail collider trigger detection caused too many issues. Go back to the old way, and just add a small Vehicle World collider on the sub's client side just for detecting water volume triggers. Subs now float reliably in swimming pools.
If a sub is sitting in an empty swimming pool and somebody starts to fill it, wake up the rigidbody so that it'll hopefully start to float
Let the vehicle detailed physics layer interact with triggers, so it can detect water volumes
Use Vehicle Detailed instead of Vehicle World in the swimming pool and paddling pool layer masks for the water volumes. Fixes submarines returning different water level results between client and server when used in a pool.
Adjusted colliders on the duo sub to match the updated model with higher roof
More friction for the subs on land
Let the subs know that they really shouldn't be able to apply thrust at all if they're on land
Refactored the sub's water checks. Simplified a bit.
Give submarines 50 starting fuel when purchased or spawned. Added the methods that the boat shop uses to all applicable vehicle types.
Cherry pick materials fix
Fixed sub still turning if rudder input was held when the player dismounted
Change sub steering swap threshold to not be at zero, so it doesn't waver when doing zero-speed turns
Fix turning sometimes kind of locking up in the subs. Need to implement this better
Subs can now get the correct depth under a water surface, even when that surface is a moon pool that's directly above them under the water
Use ConVar.Mesh.quality instead of the somewhat deprecated QualitySettings.lodBias
Have the max sub external FX distance take LODBias into account
Slow the sub down a little
Don't show sub FX beyond 100m away
Fix water surface collision plane rotation. Remove my old prop bubble FX.
Some more submarine FX hook-up work. Also now handling the situation where if you Play() a particle system, then Stop() it, then Play() it again, new particles won't play until all the particles from the previous playing state have run out. Continue playing the particles and start/stop just the emitters.
Hooked up new submarine collision FX
Hooked up submarine bow wave FX
Submarine physics edits. Fix turning not really working when travelling in reverse.
- Hooked up prop splash FX.
- Show external FX if player is in third person view.
Disable IsDestroyed assertion completely again
Less submarines on my test map
Now only running the entity OnDestroy assert on the server as at the moment on client, a bunch of these come up when first connecting to a procedural map (although that's probably an issue in itself). Note that this assert is editor-only as well.
It seems that a mountable type somewhere on procedural isn't being destroyed in the proper way. There was already an assert in BaseNetworkable to detect this, but it was commented out. Fixed the reason it was commented out (spam on editor playmode exit) and reinstated it. This has been commented out for over five years so who knows what it might show up.
Fix solo sub internal FX NRE
Add null check in mountable FixedUpdateCycle
Fix exterior dive bubbles playing when player first dismounts. Set all sub FX to not autoplay on show.
Disable the exterior FX that aren't hooked up yet
Hooked up the exterior versions of the ambient bubbles, dive bubbles, cabin lights
Interior/exterior FX split