Fixed weapon firing direction.

This commit is contained in:
Felix Ableitner 2012-12-22 16:44:07 +01:00
parent 0eee81d574
commit 21040de4dc

View file

@ -32,7 +32,7 @@ Bullet::Bullet(const sf::Vector2f& position, Body& shooter, float direction,
mDamage(config.get(KEY_DAMAGE, DEFAULT_DAMAGE)),
mSpeed(config.get(KEY_SPEED, DEFAULT_SPEED)) {
sf::Vector2f dir(1.0f, 0);
thor::setPolarAngle(dir, direction);
thor::setPolarAngle(dir, direction - 90);
setSpeed(dir, mSpeed);
setAngle(direction);
}