fix(player): players_collide també anul·la resolver i landing overlap

This commit is contained in:
JailDesigner committed 2026-05-08 13:40:30 +02:00
1 parent e25ccd02fd
commit d0d5cb0e66
2 files changed
+12

No files matched your search

+6
View File
@@ -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();