forked from jaildesigner-jailgames/jaildoctors_dilemma
fix: en windows no es calculaven be les colisions
This commit is contained in:
@@ -267,7 +267,7 @@ void Player::move()
|
||||
proj.x = static_cast<int>(x_ + vx_);
|
||||
proj.y = static_cast<int>(y_);
|
||||
proj.h = HEIGHT_;
|
||||
proj.w = ceil(abs(vx_)); // Para evitar que tenga un ancho de 0 pixels
|
||||
proj.w = static_cast<int>(std::ceil(std::fabs(vx_))); // Para evitar que tenga un ancho de 0 pixels
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_rect_x_ = proj;
|
||||
@@ -376,7 +376,7 @@ void Player::move()
|
||||
SDL_Rect proj;
|
||||
proj.x = static_cast<int>(x_);
|
||||
proj.y = static_cast<int>(y_ + vy_);
|
||||
proj.h = ceil(abs(vy_)); // Para evitar que tenga una altura de 0 pixels
|
||||
proj.h = static_cast<int>(std::ceil(std::fabs(vy_))); // Para evitar que tenga una altura de 0 pixels
|
||||
proj.w = WIDTH_;
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
Reference in New Issue
Block a user