This commit is contained in:
Ziver Koc 2007-04-18 21:44:07 +00:00
parent cfb69a3037
commit f95dfe082b

View file

@ -232,7 +232,8 @@ public abstract class Unit extends GameEntity{
}
else if(attack != null){
Weapon wepon = getWeapon(new Vector2f(unitNode.getLocation().getX(), unitNode.getLocation().getY()));
Vector2i enamyPos = Map.getPosByPixel(attack.getNode().getLocation().getX(), attack.getNode().getLocation().getY());
Vector2i enamyPos = Map.getPosByPixel(attack.getNode().getLocation().getX(), attack.getNode().getLocation().getY()+1);
if(wepon.onRange(new Vector2f(attack.getNode().getLocation().getX(), attack.getNode().getLocation().getY()))){
if(weponTimer >= wepon.getReload()){
wepon.launch(enamyPos);