mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-18 21:25:58 +00:00
[FIX] Memory leak caused by continuous F10 redrawing that for marker (add, remove) which creates new coordinate.
This commit is contained in:
@@ -185,6 +185,7 @@ EVENT = {
|
|||||||
ClassID = 0,
|
ClassID = 0,
|
||||||
MissionEnd = false,
|
MissionEnd = false,
|
||||||
RegisterSceneryOnEvent = true,
|
RegisterSceneryOnEvent = true,
|
||||||
|
CreateMarkCoordinates = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000
|
world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000
|
||||||
@@ -1524,6 +1525,9 @@ function EVENT:onEvent( Event )
|
|||||||
if Event.idx then
|
if Event.idx then
|
||||||
Event.MarkID=Event.idx
|
Event.MarkID=Event.idx
|
||||||
Event.MarkVec3=Event.pos
|
Event.MarkVec3=Event.pos
|
||||||
|
if self.CreateMarkCoordinates then
|
||||||
|
Event.MarkCoordinate=COORDINATE:NewFromVec3(Event.pos)
|
||||||
|
end
|
||||||
Event.MarkText=Event.text
|
Event.MarkText=Event.text
|
||||||
Event.MarkCoalition=Event.coalition
|
Event.MarkCoalition=Event.coalition
|
||||||
Event.IniCoalition=Event.coalition
|
Event.IniCoalition=Event.coalition
|
||||||
|
|||||||
Reference in New Issue
Block a user