From 6354eb2893c07623360f865398fcf52940ccb4a3 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 3 Jan 2024 19:50:40 -0600 Subject: [PATCH] collision handler --- src/engine/devcmd/cmds/RegionCmd.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engine/devcmd/cmds/RegionCmd.java b/src/engine/devcmd/cmds/RegionCmd.java index 664f97eb..0fcc4e19 100644 --- a/src/engine/devcmd/cmds/RegionCmd.java +++ b/src/engine/devcmd/cmds/RegionCmd.java @@ -52,8 +52,10 @@ public class RegionCmd extends AbstractDevCmd { if(building != null){ for(Mesh mesh : building.buildingMeshes){ if(mesh.boundsRect.contains(new Point2D.Float(((AbstractCharacter) target).loc.x,((AbstractCharacter) target).loc.z))){ - this.throwbackInfo(pc, "Inside Mesh Bounds"); - return; + if(((AbstractCharacter) target).loc.y < mesh.meshHeight) { + this.throwbackInfo(pc, "Inside Mesh Bounds"); + return; + } } } this.throwbackInfo(pc, "Outside Mesh Bounds");