mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fix Offset values being saved to the ZONE_UNIT class itself (#1947)
This commit is contained in:
parent
823f8fb4fb
commit
0a1d469c68
@ -1616,7 +1616,11 @@ function ZONE_UNIT:New( ZoneName, ZoneUNIT, Radius, Offset)
|
||||
if (Offset.dx or Offset.dy) and (Offset.rho or Offset.theta) then
|
||||
error("Cannot use (dx, dy) with (rho, theta)")
|
||||
end
|
||||
end
|
||||
|
||||
local self = BASE:Inherit( self, ZONE_RADIUS:New( ZoneName, ZoneUNIT:GetVec2(), Radius, true ) )
|
||||
|
||||
if Offset then
|
||||
self.dy = Offset.dy or 0.0
|
||||
self.dx = Offset.dx or 0.0
|
||||
self.rho = Offset.rho or 0.0
|
||||
@ -1624,8 +1628,6 @@ function ZONE_UNIT:New( ZoneName, ZoneUNIT, Radius, Offset)
|
||||
self.relative_to_unit = Offset.relative_to_unit or false
|
||||
end
|
||||
|
||||
local self = BASE:Inherit( self, ZONE_RADIUS:New( ZoneName, ZoneUNIT:GetVec2(), Radius, true ) )
|
||||
|
||||
self:F( { ZoneName, ZoneUNIT:GetVec2(), Radius } )
|
||||
|
||||
self.ZoneUNIT = ZoneUNIT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user