Fix bugs when finding object coalition
This commit is contained in:
@@ -705,6 +705,7 @@ do
|
|||||||
tempGroup = Group.getByName(targetGroup)
|
tempGroup = Group.getByName(targetGroup)
|
||||||
end
|
end
|
||||||
if not tempGroup then return end
|
if not tempGroup then return end
|
||||||
|
if not tempGroup.getCoalition then return end
|
||||||
|
|
||||||
local coalition = coalition or tempGroup:getCoalition()
|
local coalition = coalition or tempGroup:getCoalition()
|
||||||
|
|
||||||
@@ -980,6 +981,9 @@ do
|
|||||||
|
|
||||||
local targetUnit = event.target
|
local targetUnit = event.target
|
||||||
if not targetUnit then return end
|
if not targetUnit then return end
|
||||||
|
if not targetUnit.getCoalition then return end
|
||||||
|
if not initiator.getCoalition then return end
|
||||||
|
|
||||||
local tCoalition = targetUnit:getCoalition()
|
local tCoalition = targetUnit:getCoalition()
|
||||||
local pCoalition = initiator:getCoalition()
|
local pCoalition = initiator:getCoalition()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user