Merge pull request #2258 from leka1986/patch-3

Update Controllable.lua
This commit is contained in:
Thomas 2025-02-23 08:40:00 +01:00 committed by GitHub
commit 2b0b9d44eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4263,6 +4263,9 @@ function CONTROLLABLE:RelocateGroundRandomInRadius( speed, radius, onroad, short
self:F2( { self.ControllableName } ) self:F2( { self.ControllableName } )
local _coord = self:GetCoordinate() local _coord = self:GetCoordinate()
if not _coord then
return self
end
local _radius = radius or 500 local _radius = radius or 500
local _speed = speed or 20 local _speed = speed or 20
local _tocoord = _coord:GetRandomCoordinateInRadius( _radius, 100 ) local _tocoord = _coord:GetRandomCoordinateInRadius( _radius, 100 )