This commit is contained in:
Jesper Lundin 2007-04-18 17:49:11 +00:00
parent 14fcd78931
commit 6d06a75144
2 changed files with 5 additions and 5 deletions

View file

@ -28,7 +28,7 @@ public class BomberWeapon extends Weapon{
part.slowdown = 1;
part.rainbow = false;
part.regenerate = false;
part.size=20;
part.size=10;
return part;
}

View file

@ -32,7 +32,7 @@ public abstract class Weapon {
*/
public Weapon(Vector2f startPos) {
this.startPos = startPos;
this.minVelocity = 5;
this.minVelocity = 10;
this.hit = false;
part = getWeapon();
part.setLocation(startPos);
@ -74,11 +74,11 @@ public abstract class Weapon {
System.out.println("xVel: "+xVelocity);
//System.out.println("xVel: "+Math.abs(part.getLocation().getX()-vect.getX()));
if(xVelocity < minVelocity && xVelocity < yVelocity) {
if(xVelocity < minVelocity && xVelocity > yVelocity) {
yVelocity = (yVelocity/xVelocity)*minVelocity;
xVelocity = minVelocity;
}
if(yVelocity < minVelocity && yVelocity < xVelocity) {
if(yVelocity < minVelocity && yVelocity > xVelocity) {
xVelocity = (xVelocity/yVelocity)*minVelocity;
yVelocity = minVelocity;
}
@ -96,7 +96,7 @@ public abstract class Weapon {
}
if(Math.abs(part.getLocation().getX()-vect.getX()) < 10 && Math.abs(part.getLocation().getY()-vect.getY()) < 10) {
part.regenerate = false;
if(!hit) {
if(!hit && !InGameState.getMap().isPosEmpty(target.getX(), target.getY())) {
InGameState.getMap().getPos(target.getX(), target.getY()).damaged(damage);
hit = true;
}