Skip to content

Commit 6351bb7

Browse files
committed
build should work now conversion error in player_physics was found
1 parent f9f3439 commit 6351bb7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/cmp_player_physics.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ void PlayerPhysicsComponent::update(double dt) {
4545
// Moving Either Left or Right
4646
if (Keyboard::isKeyPressed(InputManager::getKey("walkRight"))) {
4747
if (getVelocity().x < _maxVelocity.x) {
48-
impulse({(float)(dt * _groundspeed*2), 0.01});
48+
impulse({(float)(dt * _groundspeed*2.f), 0.01f});
4949

5050
//play walking right animation
5151
anim->setFacingRight(true);
5252
anim->setCurrentRow(1);
5353
}
5454
} else {
5555
if (getVelocity().x > -_maxVelocity.x) {
56-
impulse({-(float)(dt * _groundspeed*2), 0.01});
56+
impulse({-(float)(dt * _groundspeed*2.f), 0.01f});
5757

5858
//play walking left animation
5959
anim->setFacingRight(false);
@@ -80,7 +80,7 @@ void PlayerPhysicsComponent::update(double dt) {
8080
//play idle animation
8181
anim->setCurrentRow(0);
8282
teleport(Vector2f(pos.x, pos.y - 1.0f));
83-
impulse(Vector2f(0, -8.f));
83+
impulse(Vector2f(0.f, -8.f));
8484
}
8585
}
8686

0 commit comments

Comments
 (0)