Skip to content
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

Chopping - Revise deletion of plants #134

Merged
merged 4 commits into from
Dec 12, 2024
Merged

Chopping - Revise deletion of plants #134

merged 4 commits into from
Dec 12, 2024

Conversation

Kexanone
Copy link
Member

@Kexanone Kexanone commented Dec 2, 2024

When merged this pull request will:

  • Move code from game mode to a game mode component
  • Use entity IDs instead of positions

Background:

  • The array that contains all deleted entities can be fairly large, so we prefer to not replicate it when not needed. The problem is that there is a high chance that other mods will call Replication.BumpMe on the game mode entity, so it's better to move our RplProp to our own component to have better control over its replication.
  • Replication of array<EntityID> is currently broken (see https://feedback.bistudio.com/T186903), so we have to use array<int> as a workaround for now.

@Kexanone Kexanone added this to the Backlog milestone Dec 2, 2024
@Kexanone Kexanone added the kind/optimization Release Notes: **IMPROVED:** label Dec 2, 2024
@Kexanone Kexanone modified the milestones: Backlog, 1.3.0 Dec 11, 2024
Copy link
Member

@veteran29 veteran29 left a comment

Choose a reason for hiding this comment

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

LGTM, I feel the code could be a bit more readable if we would introduce a custom container class for the Entity ID instead of the "bits" array.

@Kexanone
Copy link
Member Author

LGTM, I feel the code could be a bit more readable if we would introduce a custom container class for the Entity ID instead of the "bits" array.

Good idea. There's in fact a high chance that if put the EntityID in a custom container, replication could work without splitting it into two ints.

@Kexanone Kexanone merged commit 71be006 into master Dec 12, 2024
@Kexanone Kexanone deleted the loadtime-deletion branch December 12, 2024 14:58
@Kexanone Kexanone modified the milestones: 1.3.0, 1.2.0 Jan 21, 2025
@Kexanone Kexanone restored the loadtime-deletion branch February 20, 2025 21:52
@Kexanone Kexanone deleted the loadtime-deletion branch February 20, 2025 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/optimization Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants