1
0
mirror of https://github.com/IkarusHD/ICF-3.git synced 2025-03-04 03:03:12 -05:00

use nil instead _

One of the addons uses _ as a global variable (it's a pity that such addons exist), it stores a number that creates errors.
[acf-3] addons/acf-3/lua/acf/damage/damage_sv.lua:19: bad argument #1 to 'Send' (Entity expected, got number)
  1. Send - [C]:-1
   2. unknown - addons/acf-3/lua/acf/damage/damage_sv.lua:19
This commit is contained in:
Valera 2025-01-09 20:28:43 +07:00 committed by GitHub
parent b4254b40be
commit 92663e4c82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,7 +220,7 @@ function Damage.doPropDamage(Entity, DmgResult)
EntACF.Health = NewHealth
EntACF.Armour = EntACF.MaxArmour * (0.5 + NewHealth / MaxHealth * 0.5) -- Simulating the plate weakening after a hit
Damage.Network(Entity, _, NewHealth, MaxHealth)
Damage.Network(Entity, nil, NewHealth, MaxHealth)
end
return HitRes