Fixed weapon firing direction.
This commit is contained in:
parent
0eee81d574
commit
21040de4dc
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ Bullet::Bullet(const sf::Vector2f& position, Body& shooter, float direction,
|
||||||
mDamage(config.get(KEY_DAMAGE, DEFAULT_DAMAGE)),
|
mDamage(config.get(KEY_DAMAGE, DEFAULT_DAMAGE)),
|
||||||
mSpeed(config.get(KEY_SPEED, DEFAULT_SPEED)) {
|
mSpeed(config.get(KEY_SPEED, DEFAULT_SPEED)) {
|
||||||
sf::Vector2f dir(1.0f, 0);
|
sf::Vector2f dir(1.0f, 0);
|
||||||
thor::setPolarAngle(dir, direction);
|
thor::setPolarAngle(dir, direction - 90);
|
||||||
setSpeed(dir, mSpeed);
|
setSpeed(dir, mSpeed);
|
||||||
setAngle(direction);
|
setAngle(direction);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue