Files
BreakEscape/js
Claude 780fbb5e13 fix: Ensure NPC-table collisions are properly initialized and maintained
Fixed a timing issue where NPC-table collisions weren't being created because
table physics bodies were initialized asynchronously (delayedCall) while NPC
collision setup ran immediately.

Changes:
1. Added 10ms delay to NPC environment collision setup to ensure table/chair
   physics bodies are fully initialized first (rooms.js:2678)

2. Improved table detection logic in setupNPCTableCollisions (npc-sprites.js):
   - Removed dependency on obj.body.static flag which may not be set yet
   - Now checks scenarioData.type === 'table' first (most reliable)
   - Also checks for 'desk' or 'table' in object name as fallback
   - Added detailed logging for each table collision created

This ensures NPCs cannot walk through tables and maintains proper collision
detection throughout the game.
2025-11-20 01:31:40 +00:00
..
2025-11-14 19:47:54 +00:00
2025-11-14 19:47:54 +00:00
2025-11-14 19:47:54 +00:00