Browse Source

collision handler

server-collision
FatBoy-DOTC 11 months ago
parent
commit
6354eb2893
  1. 6
      src/engine/devcmd/cmds/RegionCmd.java

6
src/engine/devcmd/cmds/RegionCmd.java

@ -52,8 +52,10 @@ public class RegionCmd extends AbstractDevCmd {
if(building != null){ if(building != null){
for(Mesh mesh : building.buildingMeshes){ for(Mesh mesh : building.buildingMeshes){
if(mesh.boundsRect.contains(new Point2D.Float(((AbstractCharacter) target).loc.x,((AbstractCharacter) target).loc.z))){ if(mesh.boundsRect.contains(new Point2D.Float(((AbstractCharacter) target).loc.x,((AbstractCharacter) target).loc.z))){
this.throwbackInfo(pc, "Inside Mesh Bounds"); if(((AbstractCharacter) target).loc.y < mesh.meshHeight) {
return; this.throwbackInfo(pc, "Inside Mesh Bounds");
return;
}
} }
} }
this.throwbackInfo(pc, "Outside Mesh Bounds"); this.throwbackInfo(pc, "Outside Mesh Bounds");

Loading…
Cancel
Save