Added map and fixed other bugs

This commit is contained in:
2026-07-03 14:36:04 +03:00
parent 94739757be
commit 3d423974eb
161 changed files with 35735 additions and 315 deletions
@@ -48,6 +48,9 @@ public class PlayerHealth : NetworkBehaviour
{
if (!isServer) return;
if(isDead.Value) return;
PlayerShield _shield = GetComponent<PlayerShield>();
if (_shield != null && _shield.IsShieldUp) return;
currentHealth.Value = Mathf.Max(0, currentHealth.Value - _damageAmount);
}
@@ -61,6 +64,7 @@ public class PlayerHealth : NetworkBehaviour
{
if(!isServer) return;
GetComponent<PlayerShield>()?.SetShieldState(false);
isDead.Value = true;
OnDiedClientRpc();
}
@@ -69,6 +73,7 @@ public class PlayerHealth : NetworkBehaviour
{
if(!isServer) return;
GetComponent<PlayerShield>()?.SetShieldState(false);
isDead.Value = false;
currentHealth.Value = maxHealth;
RespawnClientRpc(_spawnPosition);