monster attack missing iTile collision #9

Open
opened 2025-12-13 22:58:17 +01:00 by MiauRizius · 2 comments
Owner

Monster can attack trough iTiles

Monster can attack trough iTiles
MiauRizius added the
Kind/Bug
Reviewed
Confirmed
1
Priority
High
2
labels 2025-12-13 22:58:17 +01:00
MiauRizius self-assigned this 2025-12-13 22:58:17 +01:00
Author
Owner

if(type == EntityType.MONSTER) if(panel.collisionH.checkPlayer(this)) damagePlayer(attack);

i think this is the line where to add a checker if a solid (i)Tile is between player and mob

https://git.miaurizius.de/MiauRizius/JGame2D/src/commit/e0986d470817e1aa5921aedf9a63ff653269b846/src/de/miaurizius/jgame2d/entity/Entity.java#L229 i think this is the line where to add a checker if a solid (i)Tile is between player and mob
Author
Owner

just adding

if(panel.collisionH.checkEntity(this, panel.iTile[panel.currentMap.getIndex()]) == 999) return;

should do it

just adding ```java if(panel.collisionH.checkEntity(this, panel.iTile[panel.currentMap.getIndex()]) == 999) return; ``` should do it
MiauRizius added the due date 2025-12-15 2025-12-15 09:13:20 +01:00
MiauRizius modified the due date from 2025-12-15 to 2025-12-21 2025-12-17 08:33:07 +01:00
Sign in to join this conversation.
No description provided.