diff --git a/source/game/entities/player.cpp b/source/game/entities/player.cpp index 4f47b04..746eae6 100644 --- a/source/game/entities/player.cpp +++ b/source/game/entities/player.cpp @@ -1032,6 +1032,12 @@ void Player::resolveLandingOverlap() { // canvi, qualsevol jugador amb el qual solape entra en HURT i // surt projectat. Així el solapament inicial es resol per moviment // del solapat, no per desplaçament forçat al lloc. + // + // Tweak `players.collide_with_each_other`: si està desactivat, el + // saltador travessa l'altre net en lloc de projectar-lo. Aquest + // camí és independent de `collidesWithWorld`, així que cal aturar-lo + // explícitament aquí. + if (!GameplayConfig::get().playersCollide()) { return; } if (all_players_ == nullptr) { return; } for (Player* other : *all_players_) { if (other == nullptr || other == this) { continue; } diff --git a/source/game/scenes/game_scene.cpp b/source/game/scenes/game_scene.cpp index e96b37b..d3981b9 100644 --- a/source/game/scenes/game_scene.cpp +++ b/source/game/scenes/game_scene.cpp @@ -32,6 +32,7 @@ #include "game/entities/entity_loader.hpp" #include "game/entities/event_bus.hpp" #include "game/entities/player.hpp" +#include "game/gameplay_config.hpp" #include "game/levels/level_manager.hpp" #include "game/map/map.hpp" #include "game/options.hpp" @@ -108,6 +109,11 @@ namespace { auto* a = ps[0]; auto* b = ps[1]; if (a == nullptr || b == nullptr) { return; } + // Tweak `players.collide_with_each_other`: amb el flag desactivat + // saltem TOT el resolver — head-on, push i bounce aeri queden + // anul·lats. La col·lisió contra el món continua intacta perquè + // viu a `Player::collidesWithWorld`/`tryMove`, no aquí. + if (!GameplayConfig::get().playersCollide()) { return; } const bool A_AIR = a->isAirborne(); const bool B_AIR = b->isAirborne();