mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Speedmax returning 0 not nil
This commit is contained in:
parent
3e65457041
commit
a1d67bf539
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user