MNoya / BuildingHelper

Library for RTS & TD Dota Custom Games
GNU General Public License v3.0
37 stars 14 forks source link

PlaceBuilding potential bug in buildinghelper.lua #5

Closed TheOneZealot closed 8 years ago

TheOneZealot commented 8 years ago

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.

MNoya commented 8 years ago

Correct, badly copied. Those are the fallbacks in case the function is called like PlaceBuilding(player, name, location), will fix