Skip to content

Fix dropped items turning into empty entries after a world reload - #64

Merged
leeendl merged 1 commit into
gurotopia:masterfrom
expanderbult:fix-dropped-items-reload
Oct 3, 2026
Merged

leeendl merged 1 commit into
gurotopia:masterfrom
expanderbult:fix-dropped-items-reload

Conversation

@expanderbult

Copy link
Copy Markdown
Contributor

Loading resized the object list to last_object_uid, which keeps counting up as items are picked up, so the list filled with empty drops. The count now comes from the saved data size, an empty blob no longer gets read, and the world data sends the real drop count instead of last_object_uid twice.

Loading resized the object list to last_object_uid, which keeps counting up as items are picked up, so the list filled with empty drops. The count now comes from the saved data size, an empty blob no longer gets read, and the world data sends the real drop count instead of last_object_uid twice.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@leeendl
leeendl self-requested a review October 3, 2026 22:27
int i{};
memcpy(&this->last_object_uid, u8, sizeof(u_int)); i += sizeof(u_int); // @todo real gt has this as 8 bits not just 4.
if (blob.size() >= sizeof(u_int)) memcpy(&this->last_object_uid, u8, sizeof(u_int));
i += sizeof(u_int); // @todo real gt has this as 8 bits not just 4.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you! this was very clear. i'm sorry for one lining this and making it confusing. <3

@leeendl
leeendl merged commit 6dd9e65 into gurotopia:master Oct 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants