Bug Fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user