branchrust_reboot/main/vehiclescancel
1,903 Commits over 2,191 Days - 0.04cph!
Fix BaseVehicle extra bracket
Merge from Main -> Vehicles
- █▇▍ ▌▉▉▇▊▋ ▍▋▉▌▌▊ ▊▋█ ▆▉▆▌▆▉▇▄▊▍ ▇▅▄▇ ▉▋▊▅. ▊▍▍'█ ▍▍▉▋█▇▅ ▌▇▊▍▊▊▆▄▊▅ ▇▉█▍█▇▉, ▌█▄ ▄▆▉▍▋▉ ▌▉▆▇▉▄ ▍▍ ▌▉▋ ▆▇▊▆▋▄▍ ▆█▉▉▉▊▍. ▌▄▆ ▄▊ ▋▊▅▅▌ ▊▋▇▊▆▉ ▉▄▌▉▇ ▉▋▌ ▇▅▊▋ ▆▄ ▇▄▊▇▊▄▋ ▌▅▌▄ ▄▆▌▊▍▋▇▍▌▍ █▊▄▊▇▇ █▋█ ▅▍▌▄ █▉▅'▍ ▍▆▌▋▌. ▄▉▆▆ ▌▅ ▇█▆▋█▄▍▇ ▉▋▇ ▋▆ ▄▋▊▄▅ ▅▇▄▌▋.
- ▇▋▍▆▉▊▉▇ ▄█▆█▍▌ ▆█ ▄▉▆ ▉▅▉█▉▊▅
Split StandardVehicleModule into three, with .Client/.Server separate
If chassis is destroyed, remaining modules don't naturally show their killed FX because they're not killed directly. Tell them to all show their FX.
Reduced base chassis health
Remove mountables when seating is destroyed
- Implemented destruction FX support for chassis and modules.
- Fixed Client/Server compile issues.
- Moved serverGibs from BaseVehicle to BaseHelicopterVehicle where it should have been.
Testing module destruction. Added support for damage FX + added placeholder-ish damage FX on engine modules. Note: OnHealthChanged is now called on client as well as server - existing usages have been updated with isServer checks.
Fuel now used per engine instead of per vehicle. Also use less fuel at idle, more with increasing throttle.
Cherry-pick Bill's boat fix
Merge from Main->Vehicles
Wheel rotation rate now adjusts differently when wheel is not grounded
REVERTED averageVelocity removal from #
39748. Native velocity methods weren't accurate/smooth enough
Modified tire friction and steer values
From code review: Don't reuse ProtoBuf class. Protocol++. Plus formatting.
From code review: Don't reuse MaxThrust Vector (+ some reformatting)
From code review: Change driver input sets to be a ListDictionary, and use method getters instead of properties.
From code review: LateUpdate fully enclosed by #if CLIENT
- From code review: Replace AverageVelocity with native velocity system.
- From code review: Remove more cases of inited. isSpawned is a good substitute.
- Remove [RequireComponent(typeof(Rigidbody))] as it prevented removal on the client.
From code review: Reformat serialized fields (see new Basecamp comment also)
Save rigidbody info, so data can be entered on the RB, but can still be used on the client which removes it.
From code review: Removed and replaced TransformPointToLocal/InverseTransformPointToLocal.
From code review: ModuleManager does now need to still be a MonoBehaviour since it uses a couple of Unity methods, but made that clearer.
Additional: Refactored ModuleManager classes a bit. Now TBase can be a BaseEntity which removes any need for casting.
Fix for random modular spawner double-adding modules. Simplifies module parenting as well.
From code review: AddMountPoint returns existing mount point if it's already added
From code review: Convert ID checks to use EqualNetID. Add extension method for comparing layer.
From code review: Force specification of fuel loot distance, plus general cleanup of the EntityFuelSystem class.
From code review: Make lastAttackedTime internal
Sorting out issues with drag etc
Added chassis sound manager and skid sounds. More driving physics work.
Some random variation in fade-in time sounds nicer for multi-engine vehicles
Base RPM sounds on vehicle estimated max speed. Remove engine doppler as it doesn't sound good.
Don't use UpdateWheelCollider at all, just rely on standard values
Fix driving physics not correctly updating with mass/centre of mass changes
Add module mass etc on client, so clients can get top speed estimate
Switch SoundManager to use IsUnityNull
Add Resharper DotSettings files to ignore list
Add IsUnityNull extension method that checks for both real null and Unity's fake null
Fix engines getting stuck on if player exits while engine is still starting up
Basic engine audio working. Still need to port MaxSpeedEstimate to the client to properly set up the gearing.
Added engine state info, and propagating that to modules. Added basic engine start/stop/loop audio (no pitch shift yet)
Driving physics settings edits
Merge from Main -> Vehicles
CollectionEx class adds IsNullOrEmpty, IsEmpty, and IsNull extension methods