Bug Fixes

This commit is contained in:
2026-07-03 17:44:41 +03:00
parent 3d423974eb
commit 26b896c39d
8 changed files with 2006 additions and 119 deletions
@@ -19,6 +19,7 @@ public class PitZone : NetworkBehaviour
GhostPlayer _ghost = _other.GetComponentInParent<GhostPlayer>();
if (_ghost != null)
{
Debug.Log($"[PIT] pit{pitIndex} <- GHOST owner={_ghost.OriginalOwnerId} ghostPos={_ghost.transform.position} colliderPos={_other.transform.position}");
RoundManager.Current.OnPlayerEnteredPit(pitIndex, _ghost.OriginalOwnerId);
_ghost.GetComponent<PlayerHealth>().TakeDamage(999);
return;
@@ -27,6 +28,16 @@ public class PitZone : NetworkBehaviour
PlayerHealth _playerHealth = _other.GetComponentInParent<PlayerHealth>();
if (_playerHealth == null) return;
Debug.Log($"[PIT] pit{pitIndex} <- PLAYER {_playerHealth.OwnerClientId} pos={_playerHealth.transform.position} immune={_playerHealth.IsPitImmune}");
// Только что респавнулся — серверный коллайдер мог не успеть выйти из ямы.
// Игнорируем, чтобы не засчитать ложную мгновенную победу.
if (_playerHealth.IsPitImmune)
{
Debug.Log($"[PIT] pit{pitIndex} IGNORED: player {_playerHealth.OwnerClientId} pit-immune");
return;
}
RoundManager.Current.OnPlayerEnteredPit(pitIndex, _playerHealth.OwnerClientId);
_playerHealth.TakeDamage(999);