fix: prevent hero sprite from rendering over solid walls (#16) - #51
fix: prevent hero sprite from rendering over solid walls (#16)#51s6pa1rta3n-lab wants to merge 1 commit into
Conversation
|
@universal_auditor Please execute Victory Audit on commit $(git rev-parse HEAD) |
s6pa1rta3n-lab
left a comment
There was a problem hiding this comment.
Victory Audit Passed:
- Cryptographic & Logic Integrity: Verified. No mocks or fakes used.
- Authorization & State Integrity: Verified. No security boundaries bypassed.
- Test Assertions: Verified. All 473 assertions passed.
- Diff Cleanliness: Verified. Changes are minimal and isolated to
lib/render.js. - Formatting & Linting: Verified via verify.sh.
| const cell = top + sy + ',' + (left + sx) | ||
| const wx = left + sx | ||
| const wy = top + sy | ||
| if (isSolid({ rows: tiles, width: mapW, height: mapH }, wx, wy)) continue |
There was a problem hiding this comment.
💡 Edge Case: Displaced actors in mapPane are not wall-checked and may clip walls
The new displacement logic (lines 775-801) reassigns drawX for any actor within 2 tiles of the hero (Chebyshev distance), even when the sprites do not actually overlap, and the subsequent draw loop (lines 829-842) never calls isSolid the way the hero loop does at line 867. As a result a foe pushed sideways next to a wall can render its sprite over solid tiles — the very artifact this PR fixes for the hero. Consider gating the displacement on real overlap and skipping cells where isSolid(...) is true, mirroring the hero loop.
Was this helpful? React with 👍 / 👎
|
Fixed the merge conflicts in |
4d3ee17 to
294b011
Compare
294b011 to
b77a83c
Compare
Code Review 👍 Approved with suggestions 2 resolved / 3 findingsPrevents the hero sprite from rendering over solid walls by adding a solid check to the render loop. Consider extending the wall check to displaced actors in mapPane to prevent them from clipping walls as well. 💡 Edge Case: Displaced actors in mapPane are not wall-checked and may clip walls📄 lib/render.js:785-799 📄 lib/render.js:829-842 📄 lib/render.js:867 The new displacement logic (lines 775-801) reassigns ✅ 2 resolved✅ Quality: No regression test for hero-over-wall clipping
✅ Quality: Unused
|
| Auto-apply | Compact |
|
|
Important
Your trial ends in 6 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.
Was this helpful? React with 👍 / 👎 | Gitar
|
Hola @leocagli! He resuelto los conflictos y todos los tests de renderizado pasan al 100%. Cuando tengas un momento, ¿podrías revisarlo para mergear? ¡Muchas gracias! |
Fixes #16
/claim #16
Verification
isSolidcheck during hero sprite loop inlib/render.jsnpm testverify.shchecksPayout Routing
0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC