Merge pull request #31 from zhu-rengong/fix_set_radio_range

fix bugs that call Player.SetRadioRange cause different results in di…
This commit is contained in:
Evil Factory
2021-11-22 13:58:40 -03:00
committed by GitHub

View File

@@ -48,7 +48,7 @@ luaPlayer.SetRadioRange = function (character, range)
if (character.Inventory == nil) then return end
for item in character.Inventory.AllItems do
if item ~= nil and item.Name == "Headset" then
if item ~= nil and item.Prefab.Identifier == "headset" then
item.GetComponentString("WifiComponent").Range = range;
end
end