shape
This commit is contained in:
@@ -14,8 +14,11 @@ import engine.devcmd.AbstractDevCmd;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.ZoneManager;
|
||||
import engine.math.Vector3f;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.objects.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Area;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class RegionCmd extends AbstractDevCmd {
|
||||
@@ -52,13 +55,26 @@ public class RegionCmd extends AbstractDevCmd {
|
||||
output += "NavMesh Data" + newline;
|
||||
this.throwbackInfo(pc, output);
|
||||
}
|
||||
Zone zone = ZoneManager.findSmallestZone(((AbstractCharacter) target).loc);
|
||||
if(zone != null) {
|
||||
output += "zone: " + zone.zoneName + newline;
|
||||
output += "on navmesh: " + zone.navMesh.contains(((AbstractCharacter) target).loc.x,((AbstractCharacter) target).loc.z) + newline;
|
||||
}else {
|
||||
output += "zone: null" + newline;
|
||||
//Zone zone = ZoneManager.findSmallestZone(((AbstractCharacter) target).loc);
|
||||
//if(zone != null) {
|
||||
// output += "zone: " + zone.zoneName + newline;
|
||||
// output += "on navmesh: " + zone.navMesh.contains(((AbstractCharacter) target).loc.x,((AbstractCharacter) target).loc.z) + newline;
|
||||
//}else {
|
||||
// output += "zone: null" + newline;
|
||||
//}
|
||||
if( building != null){
|
||||
boolean pointBlocked = false;
|
||||
for(Area area : building.meshes){
|
||||
Vector3fImmutable pos = ((AbstractCharacter)target).loc;
|
||||
if(area.contains(new Point((int) pos.x, (int) pos.z))){
|
||||
pointBlocked = true;
|
||||
}
|
||||
}
|
||||
output += "pointBlocked: " + pointBlocked;
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.throwbackInfo(pc, output);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user