UNIT Register - small fix for trains

This commit is contained in:
Applevangelist 2022-05-06 08:01:18 +02:00
parent a777997f79
commit 092434a103

View File

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