Dungeon crawler: reconnect restores hat emissive on untagged player body #1093

Closed
opened 2026-08-13 13:58:52 +00:00 by spikerj · 1 comment
Owner

createOtherPlayerMesh never sets userData.type on body/head/hat meshes.

handleServerPlayerReconnected restores emissive by type:

  • type === "body" → 0x1144aa @ 0.4
  • else → 0x112266 @ 0.3 (hat values)

Because nothing is tagged, every MeshStandardMaterial child (including the robe/body) takes the hat emissive after a disconnect→reconnect. The player model looks darker/wrong until they leave and rejoin.

Unit characterization: after createOtherPlayerMesh → disconnect → reconnect, the capsule (body) emissive is 0x112266, not 0x1144aa.

Fix: tag body.userData.type = "body" (and hat/head) in createOtherPlayerMesh, matching the reconnect branches.

`createOtherPlayerMesh` never sets `userData.type` on body/head/hat meshes. `handleServerPlayerReconnected` restores emissive by type: - `type === "body"` → `0x1144aa` @ 0.4 - else → `0x112266` @ 0.3 (hat values) Because nothing is tagged, every `MeshStandardMaterial` child (including the robe/body) takes the hat emissive after a disconnect→reconnect. The player model looks darker/wrong until they leave and rejoin. Unit characterization: after `createOtherPlayerMesh` → disconnect → reconnect, the capsule (body) emissive is `0x112266`, not `0x1144aa`. Fix: tag `body.userData.type = "body"` (and hat/head) in `createOtherPlayerMesh`, matching the reconnect branches.
Author
Owner

Fixed in spikersoft-angular PR #824 (9150ded4). Closing.

Fixed in `spikersoft-angular` [PR #824](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/824) (`9150ded4`). Closing.
Sign in to join this conversation.