Skip to content

Commit b0e4510

Browse files
Merge branch 'develop-2.0.0' into fix/networktransform-autoswitchspace-forcing-updates-localspace
2 parents e24aff1 + c63202f commit b0e4510

File tree

7 files changed

+340
-312
lines changed

7 files changed

+340
-312
lines changed

.yamato/package-pack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ package_pack_-_ngo_{{ platform.name }}:
4747
packages:
4848
paths:
4949
- "upm-ci~/**"
50-
{% endfor -%}
50+
{% endfor -%}

.yamato/vetting-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ vetting_test:
1010
name: MP Tools - Vetting Test (Win, {{editor}} LTS)
1111
agent: { type: Unity::VM, flavor: b1.large, image: package-ci/win11:v4 }
1212
commands:
13-
- python Tools/scripts/release.py # Needed to ensure that CHANGELOG is properly formatted for this test
1413
- npm install -g "upm-ci-utils@stable" --registry https://artifactory.prd.it.unity3d.com/artifactory/api/npm/upm-npm
1514
- unity-downloader-cli --fast --wait --unity-version {{ editor }} --components editor --arch x64
1615
- upm-ci package pack --package-path com.unity.netcode.gameobjects
@@ -22,4 +21,4 @@ vetting_test:
2221
- test-results/**
2322
- upm-ci~/test-results/**
2423
- upm-ci~/upm-ci.log
25-
{% endfor -%}
24+
{% endfor -%}

com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -785,13 +785,13 @@ public OwnershipRequestStatus RequestOwnership()
785785
// Otherwise, send the request ownership message
786786
var changeOwnership = new ChangeOwnershipMessage
787787
{
788+
ChangeMessageType = ChangeOwnershipMessage.ChangeType.RequestOwnership,
788789
NetworkObjectId = NetworkObjectId,
789790
OwnerClientId = OwnerClientId,
790791
ClientIdCount = 1,
791792
RequestClientId = NetworkManager.LocalClientId,
792793
ClientIds = new ulong[1] { OwnerClientId },
793794
DistributedAuthorityMode = true,
794-
RequestOwnership = true,
795795
OwnershipFlags = (ushort)Ownership,
796796
};
797797

@@ -866,18 +866,18 @@ internal void OwnershipRequest(ulong clientRequestingOwnership)
866866
else
867867
{
868868
// Otherwise, send back the reason why the ownership request was denied for the clientRequestingOwnership
869-
/// Notes:
870-
/// We always apply the <see cref="NetworkManager.LocalClientId"/> as opposed to <see cref="OwnerClientId"/> to the
871-
/// <see cref="ChangeOwnershipMessage.OwnerClientId"/> value as ownership could have changed and the denied requests
872-
/// targeting this instance are because there is a request pending.
873-
/// DANGO-TODO: What happens if the client requesting disconnects prior to responding with the update in request pending?
869+
// Notes:
870+
// We always apply the <see cref="NetworkManager.LocalClientId"/> as opposed to <see cref="OwnerClientId"/> to the
871+
// <see cref="ChangeOwnershipMessage.OwnerClientId"/> value as ownership could have changed and the denied requests
872+
// targeting this instance are because there is a request pending.
873+
// DANGO-TODO: What happens if the client requesting disconnects prior to responding with the update in request pending?
874874
var changeOwnership = new ChangeOwnershipMessage
875875
{
876+
ChangeMessageType = ChangeOwnershipMessage.ChangeType.RequestDenied,
876877
NetworkObjectId = NetworkObjectId,
877878
OwnerClientId = NetworkManager.LocalClientId, // Always use the local clientId (see above notes)
878879
RequestClientId = clientRequestingOwnership,
879880
DistributedAuthorityMode = true,
880-
RequestDenied = true,
881881
OwnershipRequestResponseStatus = (byte)response,
882882
OwnershipFlags = (ushort)Ownership,
883883
};
@@ -1063,10 +1063,10 @@ internal void SendOwnershipStatusUpdate()
10631063

10641064
var changeOwnership = new ChangeOwnershipMessage
10651065
{
1066+
ChangeMessageType = ChangeOwnershipMessage.ChangeType.OwnershipFlagsUpdate,
10661067
NetworkObjectId = NetworkObjectId,
10671068
OwnerClientId = OwnerClientId,
10681069
DistributedAuthorityMode = true,
1069-
OwnershipFlagsUpdate = true,
10701070
OwnershipFlags = (ushort)Ownership,
10711071
};
10721072

0 commit comments

Comments
 (0)