Speedmax returning 0 not nil

This commit is contained in:
Applevangelist 2021-10-30 16:32:42 +02:00
parent 3e65457041
commit a1d67bf539

View File

@ -568,12 +568,12 @@ function GROUP:GetSpeedMax()
local Units=self:GetUnits()
local speedmax=nil
local speedmax=0
for _,unit in pairs(Units) do
local unit=unit --Wrapper.Unit#UNIT
local speed=unit:GetSpeedMax()
if speedmax==nil then
if speedmax==0 then
speedmax=speed
elseif speed<speedmax then
speedmax=speed