Skip to content

Comments

feat: ClientObjectsSpatialHashing#2858

Closed
PrincessLunaOfficial wants to merge 3 commits intoMirrorNetworking:masterfrom
PrincessLunaOfficial:ClientObjectsSpatialHashing
Closed

feat: ClientObjectsSpatialHashing#2858
PrincessLunaOfficial wants to merge 3 commits intoMirrorNetworking:masterfrom
PrincessLunaOfficial:ClientObjectsSpatialHashing

Conversation

@PrincessLunaOfficial
Copy link

@PrincessLunaOfficial PrincessLunaOfficial commented Jul 30, 2021

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().

@PrincessLunaOfficial PrincessLunaOfficial changed the title Add files via upload ClientObjectsSpatialHashing Jul 30, 2021
@PrincessLunaOfficial PrincessLunaOfficial changed the title ClientObjectsSpatialHashing feath: ClientObjectsSpatialHashing Jul 30, 2021
@PrincessLunaOfficial PrincessLunaOfficial changed the title feath: ClientObjectsSpatialHashing feat: ClientObjectsSpatialHashing Jul 30, 2021
@MrGadget1024 MrGadget1024 added the Conflicts Has merge conflicts that need to be fixed first. label Aug 10, 2021
@MrGadget1024 MrGadget1024 added Awaiting Review enhancement New feature or request and removed Conflicts Has merge conflicts that need to be fixed first. labels Aug 11, 2021
@MrGadget1024 MrGadget1024 requested a review from miwarnec August 11, 2021 14:43

// put into grid
grid.Add(position, connection);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
}

@MrGadget1024 MrGadget1024 added work in progress Need more time to decide. Nothing to do here for now. and removed Awaiting Review labels Dec 7, 2021
@miwarnec
Copy link
Collaborator

will keep it open to remember to reopen another PR. this one misses OnCheckObserver check

@miwarnec
Copy link
Collaborator

closing as this is 3 years old

@miwarnec miwarnec closed this Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Needs Research work in progress Need more time to decide. Nothing to do here for now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants