mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
don't display inflicted damage for the same player
This commit is contained in:
parent
9e7378d1ca
commit
c52fd29de8
1 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ namespace SanAndreasUnity.Behaviours
|
|||
|
||||
public void OnReceivedDamageEventFromServer(float damageAmount, Ped attackingPed)
|
||||
{
|
||||
if (attackingPed != null && attackingPed.IsControlledByLocalPlayer)
|
||||
if (attackingPed != null && attackingPed.IsControlledByLocalPlayer && attackingPed != this)
|
||||
{
|
||||
this.DisplayInflictedDamageMessage(damageAmount);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ namespace SanAndreasUnity.Behaviours
|
|||
msg.velocity = Random.insideUnitCircle.normalized * PedManager.Instance.inflictedDamageMessageVelocityInScreenPerc;
|
||||
msg.TextColor = PedManager.Instance.inflictedDamageMessageColor;
|
||||
msg.timeLeft = PedManager.Instance.inflictedDamageMessageLifetime;
|
||||
msg.Text = damageAmount.ToString();
|
||||
msg.Text = Mathf.RoundToInt(damageAmount).ToString();
|
||||
}
|
||||
|
||||
public void Kill()
|
||||
|
|
Loading…
Reference in a new issue