Fix Pipe Surface Floater's movements - #2873
tornac1234 wants to merge 23 commits into
Conversation
|
I'll send a commit with slight corrections (fixing the test too) once #2845 is merged |
1d50d81 to
c7e3665
Compare
Test Results272 tests +3 267 ✅ +3 10s ⏱️ ±0s Results for commit e7b82de. ± Comparison against base commit 24730bf. This pull request removes 2 and adds 5 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
…ent-side. Changed entity position broadcast rate to 10/s
…olled's utility code and moved it to MovementHelper
cc36fce to
dc8a1d7
Compare
|
Added a commit to answer the requested changes. Also deprecated MultiplayerVehicleControl for good since it was entirely replaced by MovementReplicator. |
There was a problem hiding this comment.
🟡 Changes recommended
Ownership notifications, cell-transfer handling, and coordinate conversion currently introduce synchronization regressions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Improves remote entity movement, pipe-floater synchronization, and position broadcasting efficiency.
Changes:
- Reworks remote movement smoothing and teleport correction.
- Makes surfaced pipe floaters static for remote players.
- Refactors entity broadcasting and simulation ownership synchronization.
File summaries
| File | Description |
|---|---|
NitroxPatcher/Patches/Dynamic/Vehicle_OnPilotModeEnd_Patch.cs |
Removes obsolete vehicle control cleanup. |
NitroxPatcher/Patches/Dynamic/SplineFollowing_GoTo_Patch.cs |
Uses the broadcaster instance for spline updates. |
NitroxPatcher/Patches/Dynamic/PropulsionCannon_GrabObject_Patch.cs |
Updates entity-watching API usage. |
NitroxPatcher/Patches/Dynamic/PipeSurfaceFloater_FixedUpdate_Patch.cs |
Controls remote floater surfacing behavior. |
NitroxPatcher/Patches/Dynamic/CreatureDeath_OnKillAsync_Patch.cs |
Updates movement-control cleanup. |
NitroxClient/Unity/Smoothing/SmoothVector.cs |
Modernizes namespace formatting. |
NitroxClient/Unity/Smoothing/SmoothRotation.cs |
Modernizes namespace formatting. |
NitroxClient/MonoBehaviours/Vehicles/WatchedEntry.cs |
Corrects private field naming. |
NitroxClient/MonoBehaviours/RemotelyControlledPipeFloater.cs |
Locks surfaced floaters to synchronized transforms. |
NitroxClient/MonoBehaviours/RemotelyControlled.cs |
Reworks remote physics and spline movement. |
NitroxClient/MonoBehaviours/MultiplayerVehicleControl.cs |
Removes obsolete vehicle smoothing implementation. |
NitroxClient/MonoBehaviours/EntityPositionBroadcaster.cs |
Refactors tracking and reduces allocations. |
NitroxClient/GameLogic/SimulationOwnership.cs |
Centralizes ownership acquisition and broadcasting. |
NitroxClient/GameLogic/RemotePlayer.cs |
Adds distance-based teleport correction. |
NitroxClient/GameLogic/MovementHelper.cs |
Extracts teleport and correction helpers. |
NitroxClient/GameLogic/Items.cs |
Claims ownership immediately for dropped items. |
NitroxClient/GameLogic/Entities.cs |
Clears unresolved broadcaster entries during spawning. |
NitroxClient/Communication/Packets/Processors/RemoveCreatureCorpseProcessor.cs |
Updates broadcaster API usage. |
NitroxClient/Communication/Packets/Processors/EntityTransformUpdatesProcessor.cs |
Removes a stray statement. |
Nitrox.Test/Patcher/Patches/PatchesTranspilerTest.cs |
Removes the obsolete transpiler expectation. |
Nitrox.Server.Subnautica/Models/Packets/Processors/EntitySpawnedByClientProcessor.cs |
Changes ownership assignment for client spawns. |
Nitrox.Server.Subnautica/Models/Packets/Processors/CellVisibilityChangedProcessor.cs |
Bundles simulation data with spawned entities. |
Nitrox.Server.Subnautica/Models/GameLogic/Entities/EntitySimulation.cs |
Shares simulation policy and adds forced assignment. |
Nitrox.Model/Extensions/DictionaryExtensions.cs |
Adds pooled conditional dictionary removal. |
Nitrox.Model.Subnautica/Packets/SpawnEntities.cs |
Revises simulation-aware constructors. |
Nitrox.Model.Subnautica/Helper/SimulationWhitelist.cs |
Moves simulation policy into the shared model. |
Review details
- Files reviewed: 26/26 changed files
- Comments generated: 6
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| private void CheckEntities() | ||
| { | ||
| // when fishes die, they're only a corpse and their swim behaviour stops functioning | ||
| splineEntities.RemoveWhere(pair => |
There was a problem hiding this comment.
I find the usage of RemoveWhere in this class really weird, we're adding side effects to a boolean predicate
There was a problem hiding this comment.
If you can suggest a better name for RemoveWhere please, I've been thinking but it's really hard. Also I really think the performance gain from it is worth it. So either we rename it or we copy paste the code twice 😩
…and to be more optimized
…ve to recognize them or kick them out of home
…hildren correctly
28cbd8e to
dc8a1d7
Compare
Measurity
left a comment
There was a problem hiding this comment.
LGTM
PipeSurfaceFloater audio plays while holding but appears to be vanilla bug.
Linked Issues / Context
Description of Change
Validation
To observe the actual PipeSurfaceFloater fix:
item pipesurfacefloaterto get oneTo observe Reaper Leviathan's movements improvements (as a side effect from the whole rework):
spawn reaperleviathanPR Checklist
mainat the time of openingHas tests for the changes (if applicable)Has a linked issueHas been tested on Windows/Linux/macOS (if applicable) (for cross-platform code)AI was used to review myself before opening this PR