forked from jaildesigner-jailgames/jaildoctors_dilemma
apegat de mala manera els shaders del CCAE i fets uns apanyets per a vore si compila
This commit is contained in:
@@ -252,7 +252,7 @@ void Player::move() {
|
||||
|
||||
// Si ha tocado alguna rampa mientras camina (sin saltar), asciende
|
||||
if (state_ != PlayerState::JUMPING) {
|
||||
const LineVertical LEFT_SIDE = {static_cast<int>(x_), static_cast<int>(y_) + HEIGHT_ - 2, static_cast<int>(y_) + HEIGHT_ - 1}; // Comprueba solo los dos pixels de abajo
|
||||
const LineVertical LEFT_SIDE = {x_, y_ + HEIGHT_ - 2, y_ + HEIGHT_ - 1}; // Comprueba solo los dos pixels de abajo
|
||||
const int LY = room_->checkLeftSlopes(&LEFT_SIDE);
|
||||
if (LY > -1) {
|
||||
y_ = LY - HEIGHT_;
|
||||
@@ -269,8 +269,8 @@ void Player::move() {
|
||||
else if (vx_ > 0.0f) {
|
||||
// Crea el rectangulo de proyección en el eje X para ver si colisiona
|
||||
SDL_FRect proj;
|
||||
proj.x = static_cast<int>(x_) + WIDTH_;
|
||||
proj.y = static_cast<int>(y_);
|
||||
proj.x = x_ + WIDTH_;
|
||||
proj.y = y_;
|
||||
proj.h = HEIGHT_;
|
||||
proj.w = ceil(vx_); // Para evitar que tenga un ancho de 0 pixels
|
||||
|
||||
@@ -292,7 +292,7 @@ void Player::move() {
|
||||
|
||||
// Si ha tocado alguna rampa mientras camina (sin saltar), asciende
|
||||
if (state_ != PlayerState::JUMPING) {
|
||||
const LineVertical RIGHT_SIDE = {static_cast<int>(x_) + WIDTH_ - 1, static_cast<int>(y_) + HEIGHT_ - 2, static_cast<int>(y_) + HEIGHT_ - 1}; // Comprueba solo los dos pixels de abajo
|
||||
const LineVertical RIGHT_SIDE = {x_ + WIDTH_ - 1, y_ + HEIGHT_ - 2, y_ + HEIGHT_ - 1}; // Comprueba solo los dos pixels de abajo
|
||||
const int RY = room_->checkRightSlopes(&RIGHT_SIDE);
|
||||
if (RY > -1) {
|
||||
y_ = RY - HEIGHT_;
|
||||
|
||||
Reference in New Issue
Block a user