Skip to content

Fix renamed equipped-model entities rendering their name as gear - #10903

Open
DriftwoodGaming wants to merge 1 commit into
LandSandBoat:basefrom
DriftwoodGaming:fix/renamed-equipped-look
Open

Fix renamed equipped-model entities rendering their name as gear#10903
DriftwoodGaming wants to merge 1 commit into
LandSandBoat:basefrom
DriftwoodGaming:fix/renamed-equipped-look

Conversation

@DriftwoodGaming

@DriftwoodGaming DriftwoodGaming commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Stops a renamed trust/fellow-style entity from having its name written over its gear models in the 0x00E packet.

In updateWith, the spawn branch copies a MODEL_EQUIPPED look_t to 0x30. That look is 20 bytes, so it covers 0x30-0x43. The renamed branch underneath then writes the name at 0x34, which lands on top of head, body, hands, legs, feet, main, sub and ranged.

Most of the time you never see it, because a normal update doesn't set UPDATE_LOOK and the client ignores those bytes. It shows up when CCharEntity::updateEntityPacket merges a later update into a spawn packet that hasn't been flushed yet — the flag byte gets OR'd, UPDATE_LOOK is still set from the spawn, and the client reads the name text as gear model ids. A trust named "Tea" spawns with head = 'T','e', body = 'a',0 and nothing from main onward, so it also shows up with no weapon.

The spawn branch already handles these entities with the 0x56 layout that puts the name at 0x44, so they've got their name from the spawn packet and don't need the name re-sent on every update. This skips that re-send for exactly that case.

Steps to test these changes

  1. renameEntity a MODEL_EQUIPPED entity with targid >= 0x700 — a trust is the easiest one to reach.
  2. Spawn it. Any time an update merges into the still-queued spawn packet, it comes out in random-looking gear with an empty weapon slot.
  3. Zone. It looks correct again until the next time an update merges in.
  4. With this change, the same entity keeps both its renamed name and its look.

A MODEL_EQUIPPED look_t is memcpy'd into the 0x00E packet at 0x30 and is 20
bytes, so it spans 0x30-0x43. The renamed-entity branch below it then writes
the name at 0x34, overwriting head/body/hands/legs/feet/main/sub/ranged.

Usually invisible, because a routine update's flag byte has no UPDATE_LOOK and
the client ignores those bytes. But CCharEntity::updateEntityPacket merges a
later update into a still-queued packet for the same entity and ORs the flag
byte, so an update merged into an unflushed spawn keeps UPDATE_LOOK set and the
client renders the name text as gear model ids. An entity named "Tea" spawns
wearing head = 'T','e', body = 'a',0 and nothing from main onward, so it also
loses its weapon model.

The spawn path already solves this with the larger 0x56 layout and the name at
0x44. Skip the redundant per-update re-send for exactly those entities.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✨ Hello and thanks for the PR! ✨

🤖: This is a friendly automated reminder that the maintainers won't look at your PR until you've properly completed all of the checkboxes in the pre-filled template.

@Nobutadas

Copy link
Copy Markdown
Contributor

Do you have a capture so we can check the packets?

@DriftwoodGaming

Copy link
Copy Markdown
Contributor Author

I haven't tested on retail, Nobutadas but you can //pv track incoming 0x00E if you have an account active.

@sruon

sruon commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

I see you've restored the template, thanks.

I have no doubt the entity packet is broken in certain cases (and in fact what you're going through is a very well known pitfall that has caused many bugs) but can you tell me which retail content requires renaming dynamic entities?

There's work underway to rewrite this packet entirely and I am not interested in adding more hacks unless they are provably blocking implementation of retail content.

@DriftwoodGaming

Copy link
Copy Markdown
Contributor Author

It may not be needed on retail-era servers, this is a bug I found while updating a private customized rework of the game.

@zach2good

Copy link
Copy Markdown
Contributor

Nobutadas but you can //pv track incoming 0x00E if you have an account active.

Burden is on you to provide proof. If we had to go and do caps and full verification on every single PR that came in, we'd get nothing done.

@zach2good zach2good added the hold On hold, pending further action/info label Jul 26, 2026
@DriftwoodGaming

Copy link
Copy Markdown
Contributor Author

No worries, that's fair.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold On hold, pending further action/info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants