feat: ClientObjectsSpatialHashing#2858
Closed
PrincessLunaOfficial wants to merge 3 commits intoMirrorNetworking:masterfrom
Closed
feat: ClientObjectsSpatialHashing#2858PrincessLunaOfficial wants to merge 3 commits intoMirrorNetworking:masterfrom
PrincessLunaOfficial wants to merge 3 commits intoMirrorNetworking:masterfrom
Conversation
MrGadget1024
requested changes
Aug 10, 2021
Assets/Mirror/Components/InterestManagement/SpatialHashing/SpatialHashingInterestManagement.cs
Outdated
Show resolved
Hide resolved
MrGadget1024
approved these changes
Aug 11, 2021
MrGadget1024
requested changes
Dec 7, 2021
|
|
||
| // put into grid | ||
| grid.Add(position, connection); | ||
|
|
Collaborator
There was a problem hiding this comment.
clientOwnedObjects includes the primary player object, so this needs to be reworked as:
if (projectNearClientOwnedObjects)
{
foreach (NetworkIdentity clientOwnedObject in connection.clientOwnedObjects)
{
Vector2Int clientOwnedObjectPosition = ProjectToGrid(clientOwnedObject.transform.position);
grid.Add(clientOwnedObjectPosition, connection);
}
}
else
{
Vector2Int position = ProjectToGrid(connection.identity.transform.position);
grid.Add(position, connection);
}
Collaborator
|
will keep it open to remember to reopen another PR. this one misses OnCheckObserver check |
28fe97d to
dfd4d0b
Compare
Collaborator
|
closing as this is 3 years old |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Allows SpatialHashingInterestManagement to include NetworkConnection.clientOwnedObjects into grid projection checks.
It allows player to leave his pet anywhere and all entities around pet are considered IsWorthUpdating().