UNIT Register - small fix for trains

This commit is contained in:
Applevangelist 2022-05-06 08:01:31 +02:00
parent 69eb920173
commit 7c5067a59a

View File

@ -119,7 +119,10 @@ function UNIT:Register( UnitName )
local unit=Unit.getByName(self.UnitName)
if unit then
self.GroupName=unit:getGroup():getName()
local group = unit:getGroup()
if group then
self.GroupName=group:getName()
end
end
-- Set event prio.