mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-27 01:58:33 +01:00
fix(iso): infer facing (not always down) + render features as tiles not avatars
Two iso bugs from reusing the tavern renderer for the SP dungeon: - Character always faced down/SW: sceneFromGameState hardcoded facing:"down", so the renderers ignored their movement-inferred facing (truthy default won). Now facing defaults to null (SP server sends none) so iso/3D infer it from movement; facingDelta(null)=down keeps tiled fine. - "Copy of himself at the origin": the iso renderer drew EVERY entity via _charFrame, so the entrance feature rendered as a male character at the start. Features/items now draw as pack tiles (stairs/chest) or a glyph; monsters get a red tint so they do not read as a second player.
This commit is contained in:
@@ -251,7 +251,9 @@ function sceneFromGameState(state, opts) {
|
||||
var playerEntity = {
|
||||
id: 'player', x: state.player.x, y: state.player.y,
|
||||
kind: 'player', char: '@', color: '#9aa4b2',
|
||||
facing: state.player.facing || 'down', label: null,
|
||||
// No bogus default: the SP server doesn't send facing, so leave it null and let the iso/3D
|
||||
// renderers INFER facing from movement. A hardcoded 'down' made them always face down/SW.
|
||||
facing: state.player.facing || null, label: null,
|
||||
you: !state.isSpectating
|
||||
};
|
||||
// Attach the player's appearance if available (for render-kit character rendering).
|
||||
|
||||
Reference in New Issue
Block a user