From 8a8b806362e65ac02d7650d559b75571d75ab6f3 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Wed, 4 May 2022 18:09:56 +0200 Subject: [PATCH] further event related stuff not working any more --- Moose Development/Moose/Core/Set.lua | 6 +++++- Moose Development/Moose/Core/Zone.lua | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index f39a411db..7ab8607b0 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -1332,7 +1332,11 @@ do -- SET_GROUP if Event.IniDCSUnit then local ObjectName, Object = self:FindInDatabase( Event ) if ObjectName then - if Event.IniDCSGroup:getSize() == 1 then -- Only remove if the last unit of the group was destroyed. + local size = 1 + if Event.IniDCSGroup then + size = Event.IniDCSGroup:getSize() + end + if size == 1 then -- Only remove if the last unit of the group was destroyed. self:Remove( ObjectName ) end end diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index 80c94bdf0..09a148987 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -1996,7 +1996,9 @@ end -- @return #boolean true if the point is within the zone. function ZONE_POLYGON_BASE:IsVec3InZone( Vec3 ) self:F2( Vec3 ) - + + if not Vec3 then return false end + local InZone = self:IsVec2InZone( { x = Vec3.x, y = Vec3.z } ) return InZone