shape
This commit is contained in:
@@ -19,6 +19,7 @@ import engine.objects.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Area;
|
||||
import java.awt.geom.Path2D;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class RegionCmd extends AbstractDevCmd {
|
||||
@@ -64,9 +65,9 @@ public class RegionCmd extends AbstractDevCmd {
|
||||
//}
|
||||
if( building != null){
|
||||
boolean pointBlocked = false;
|
||||
for(Area area : building.meshes){
|
||||
for(Path2D.Float area : building.meshes){
|
||||
Vector3fImmutable pos = ((AbstractCharacter)target).loc;
|
||||
if(area.contains(new Point((int) pos.x, (int) pos.z))){
|
||||
if(area.contains(pos.x, pos.z)){
|
||||
pointBlocked = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user