Repository navigation
Fix Pipe Surface Floater's movements #2873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tornac1234
wants to merge
23
commits into
SubnauticaNitrox:master
Choose a base branch
from
tornac1234:fix/surface-floater-movement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
3176c36
Converted SimulationOwnership to file-scoped namespace
tornac1234 10dc63e
Reworked RemotelyControlled and EntityPositionBroadcaster
tornac1234 022cc0c
Reworked RemotelyControlled to fix Pipe Surface Floater's movements
tornac1234 1e81ce5
Set no interpolation on surfaced floater to prevent little vibrations…
tornac1234 e430eb7
Now check if entity should change position without assuming it on cli…
tornac1234 dc8a1d7
Properly clean not spawned simulated entities, refactor RemotelyContr…
tornac1234 e4f66e3
Add a test class for DictionaryExtensions.RemoveWhere, and a comment
tornac1234 94e6e46
Reworked WorldEntityManager to only serve top entities (unparented), …
tornac1234 6eea5e9
Reworked and upgraded server-side simulation ownership to be more per…
tornac1234 9d5ce48
Feat: Preload all prefabs when starting the game
tornac1234 4f9be12
Fix: crash will now spawn by themselves and their parent home will ha…
tornac1234 5eaed20
Fix: reefback spawn now profits from prefab preload and handles its c…
tornac1234 5634192
Fix batch spawn regression and leftover misses
tornac1234 40a2847
fix: improve placeholder group spawn by using prefab preload
tornac1234 c0a9ffb
Feat: upgrade Entities.cs to better work with in-spawner children spa…
tornac1234 75e2065
Fix: try fix remote player race conditions
tornac1234 64294d9
Fix certain entities dispawning because of wrong LargeWorldEntity reg…
tornac1234 5711784
Feat: allow simulation of underwater rocks (those with floaters)
tornac1234 f9471da
Refactoring according to reviews
tornac1234 f811050
Set PrefabLoadInitialSyncProcessor to be public so it can be accessed…
tornac1234 3861f6d
Fix entity spawn misplacements issues
tornac1234 3385e12
Bump cache version because of modifications to prefab cache contents
tornac1234 e7b82de
Reduced allocations in EntityPositionBroadcaster
Measurity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Nitrox.Model.Subnautica/Packets/LastEntityTransformUpdate.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| using System; | ||
| using Nitrox.Model.Packets; | ||
| using static Nitrox.Model.Subnautica.Packets.EntityTransformUpdates; | ||
|
|
||
| namespace Nitrox.Model.Subnautica.Packets; | ||
|
|
||
| [Serializable] | ||
| public class LastEntityTransformUpdate(EntityTransformUpdate lastUpdate) : Packet | ||
| { | ||
| public EntityTransformUpdate LastUpdate { get; set; } = lastUpdate; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| using System; | ||
| using System.Buffers; | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace Nitrox.Model.Extensions; | ||
|
|
||
| public static class SetExtensions | ||
| { | ||
| public static void RemoveWhere<TParam, T>(this ISet<T> self, TParam parameter, Func<TParam, T, bool> predicate) | ||
| { | ||
| int toRemoveIndex = 0; | ||
| T[] toRemove = ArrayPool<T>.Shared.Rent(self.Count); | ||
| try | ||
| { | ||
| foreach (T item in self) | ||
| { | ||
| if (predicate(parameter, item)) | ||
| { | ||
| toRemove[toRemoveIndex++] = item; | ||
| } | ||
| } | ||
| for (int i = 0; i < toRemoveIndex; i++) | ||
| { | ||
| self.Remove(toRemove[i]); | ||
| } | ||
| } | ||
| finally | ||
| { | ||
| ArrayPool<T>.Shared.Return(toRemove, true); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.