Core/Movement: Add a debug log when a player falls below the map

(cherry picked from commit 1c08395e8a)
This commit is contained in:
jackpoz
2020-12-09 19:52:12 +01:00
committed by Shauren
parent 3a4ce889ea
commit 362a1c32c2

View File

@@ -430,6 +430,7 @@ void WorldSession::HandleMovementOpcode(OpcodeClient opcode, MovementInfo& movem
/// @todo discard movement packets after the player is rooted
if (plrMover->IsAlive())
{
TC_LOG_DEBUG("entities.player.falldamage", "FALLDAMAGE Below map. Map min height: %f , Player debug info:\n%s", plrMover->GetMap()->GetMinHeight(plrMover->GetPhaseShift(), movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY()), plrMover->GetDebugInfo().c_str());
plrMover->AddPlayerFlag(PLAYER_FLAGS_IS_OUT_OF_BOUNDS);
plrMover->EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetPlayer()->GetMaxHealth());
// player can be alive if GM/etc