eliminats comentaris i info de debug

This commit is contained in:
2025-11-17 14:03:57 +01:00
parent d185a5e72a
commit 6a18d880f2
2 changed files with 7 additions and 8 deletions

View File

@@ -110,7 +110,7 @@ void Player::transitionToState(State state) {
switch (state) {
case State::ON_GROUND:
std::cout << "ON_GROUND\n";
//std::cout << "ON_GROUND\n";
vy_ = 0;
handleDeathByFalling();
jump_sound_ctrl_.reset();
@@ -118,7 +118,7 @@ void Player::transitionToState(State state) {
current_slope_ = nullptr;
break;
case State::ON_SLOPE:
std::cout << "ON_SLOPE\n";
//std::cout << "ON_SLOPE\n";
vy_ = 0;
handleDeathByFalling();
jump_sound_ctrl_.reset();
@@ -126,7 +126,7 @@ void Player::transitionToState(State state) {
updateCurrentSlope();
break;
case State::JUMPING:
std::cout << "JUMPING\n";
//std::cout << "JUMPING\n";
// Puede saltar desde ON_GROUND o ON_SLOPE
if (previous_state_ == State::ON_GROUND || previous_state_ == State::ON_SLOPE) {
vy_ = -MAX_VY;
@@ -137,7 +137,7 @@ void Player::transitionToState(State state) {
}
break;
case State::FALLING:
std::cout << "FALLING\n";
//std::cout << "FALLING\n";
fall_start_position_ = static_cast<int>(y_);
last_grounded_position_ = static_cast<int>(y_);
vy_ = MAX_VY;
@@ -644,14 +644,17 @@ void Player::updateCurrentSlope() {
}
// Debug output
/*
if (current_slope_ != nullptr) {
const char* TYPE = isLeftSlope() ? "Left \\" : "Right /";
std::cout << "[SLOPE] " << TYPE
<< " from (" << current_slope_->x1 << "," << current_slope_->y1 << ")"
<< " to (" << current_slope_->x2 << "," << current_slope_->y2 << ")\n";
} else {
std::cout << "[SLOPE] nullptr\n";
}
*/
}
// Comprueba que el jugador no toque ningun tile de los que matan