MNoya / BuildingHelper

Library for RTS & TD Dota Custom Games

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PlaceBuilding potential bug in buildinghelper.lua

TheOneZealot opened this issue · comments

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.

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