PlaceBuilding potential bug in buildinghelper.lua
TheOneZealot opened this issue · comments
Henrik Melsom commented
In buildinghelper.lua function PlaceBuilding, newName is used though never declared (unless i'm missing something).
construction_size = construction_size or BuildingHelper:GetConstructionSize(newName)
pathing_size = pathing_size or BuildingHelper:GetBlockPathingSize(newName)
If i'm not mistaken this should be
construction_size = construction_size or BuildingHelper:GetConstructionSize(name)
pathing_size = pathing_size or BuildingHelper:GetBlockPathingSize(name)
since name is passed as an argument.
Martin Noya commented
Correct, badly copied. Those are the fallbacks in case the function is called like PlaceBuilding(player, name, location)
, will fix