branchrust_reboot/main/BuoyancyHotfix/BuoyancyPerfcancel

6 Commits over 0 Days - ∞cph!

11 Months Ago
Only do the early EnsurePointsInitialized call if loading from save
11 Months Ago
Although the previous commit fixed a big problem, it was rather slow (MultiplyPoint3x4 is MUCH faster than transform.position). Since we're trying to improve performance here rather than make it worse, let's go back to the old system, but make PlayerCorpse manually call EnsurePointsInitialized early, which gets the data before physics have a chance to go crazy and end up with us caching very weird limb positions (happens sometimes on loading existing ragdolls from a save)
11 Months Ago
The cached rootToPoint stuff doesn't work correctly with ragdolls since the limbs can move relative to the root bone. I've now set ragdolls (both client-side and server-side) to not use the cached data.
11 Months Ago
Save time reparenting Buoyancy points - just use InverseTransformPoint
11 Months Ago
Buoyancy code now works in harmony with the new server-side ragdolls, and they go kinematic instead of attempting to sleep when the buoyancy code wants to sleep them (when being set to sleep, they kept waking up)
11 Months Ago
Eliminate BuoyancyFixedUpdate calls if there's nobody around