-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Movement Overhaul #2073
Open
killzoms
wants to merge
19
commits into
SubnauticaNitrox:master
Choose a base branch
from
killzoms:playerStretching
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
Movement Overhaul #2073
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1865df1
overhaul movment
killzoms c371846
fix null ref
killzoms 9b3d28f
add some Kinematic prevention patches
killzoms 6d58ba4
first round of bug fixes
killzoms 0371b0f
add QoL change to GroundMotor.movingPlatform.movementTransfer
tornac1234 16f4d51
disallow High Precision physics when the Cyclops is being simulated
killzoms 58380f4
latest changes
killzoms 2b30676
couple bug fixes
killzoms 2f29edb
movementTransfer patch fix
killzoms 22caa5b
Reapply HighPrecisionPhysics
killzoms 65d0284
removed all unused usings, made most requested changes
killzoms 696dd1c
Minor Refactoring in MovementController
killzoms a322743
most Requested changes
killzoms f29f922
rename MovementController
killzoms 3b94bd1
Requested changes
killzoms a8524bb
fix for vehicle yeet
killzoms 8e2ebf0
Fix Vehicle movement stutter
killzoms beab7d5
Null Ref fix
killzoms 5cda5e2
Last couple major bugs fixed
killzoms 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 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 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
12 changes: 2 additions & 10 deletions
12
Nitrox.Test/Client/Communication/DeferredPacketReceiverTest.cs
This file contains 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 |
---|---|---|
@@ -1,30 +1,22 @@ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Nitrox.Test.Client.Communication; | ||
using NitroxClient.Map; | ||
using NitroxModel.DataStructures.GameLogic; | ||
using NitroxModel.DataStructures.Unity; | ||
using NitroxModel.Packets; | ||
|
||
namespace NitroxClient.Communication; | ||
|
||
[TestClass] | ||
public class DeferredPacketReceiverTest | ||
{ | ||
private readonly VisibleCells visibleCells = new(); | ||
private PacketReceiver packetReceiver; | ||
|
||
// Test Data | ||
private const ushort PLAYER_ID = 1; | ||
private const int CELL_LEVEL = 3; | ||
private readonly NitroxVector3 loadedActionPosition = new(50, 50, 50); | ||
private AbsoluteEntityCell loadedCell; | ||
|
||
[TestInitialize] | ||
public void TestInitialize() | ||
{ | ||
packetReceiver = new PacketReceiver(); | ||
loadedCell = new AbsoluteEntityCell(loadedActionPosition, CELL_LEVEL); | ||
visibleCells.Add(loadedCell); | ||
ClientAutoFacRegistrar registrar = new ClientAutoFacRegistrar(); | ||
} | ||
Comment on lines
15
to
20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Method can be completely removed. |
||
|
||
[TestMethod] | ||
|
This file contains 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 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
2 changes: 1 addition & 1 deletion
2
Nitrox.Test/Patcher/Patches/Dynamic/DevConsole_Update_PatchTest.cs
This file contains 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 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 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
1 change: 0 additions & 1 deletion
1
NitroxClient/Communication/MultiplayerSession/MultiplayerSessionManager.cs
This file contains 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
25 changes: 25 additions & 0 deletions
25
NitroxClient/Communication/Packets/Processors/BasicMovementProcessor.cs
This file contains 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,25 @@ | ||
using NitroxClient.Communication.Packets.Processors.Abstract; | ||
using NitroxClient.MonoBehaviours; | ||
using NitroxModel.Packets; | ||
using NitroxModel_Subnautica.DataStructures; | ||
using UnityEngine; | ||
|
||
namespace NitroxClient.Communication.Packets.Processors; | ||
|
||
public class BasicMovementProcessor : ClientPacketProcessor<BasicMovement> | ||
{ | ||
public override void Process(BasicMovement movement) | ||
{ | ||
if (!MultiplayerMovementController.TryGetMovementControllerFrom(movement.Id, out MultiplayerMovementController mc) && | ||
NitroxEntity.TryGetObjectFrom(movement.Id, out GameObject gameObject)) | ||
{ | ||
mc = gameObject.EnsureComponent<MultiplayerMovementController>(); | ||
} | ||
|
||
if (mc) | ||
{ | ||
mc.TargetPosition = movement.Position.ToUnity(); | ||
mc.TargetRotation = movement.Rotation.ToUnity(); | ||
} | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
NitroxClient/Communication/Packets/Processors/ExosuitArmActionProcessor.cs
This file contains 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
1 change: 0 additions & 1 deletion
1
NitroxClient/Communication/Packets/Processors/ItemPositionProcessor.cs
This file contains 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 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 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 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.