Generate unit_id for helipads

fixes mission scripting error (1748)

cherry-picked from 676a256
This commit is contained in:
RndName 2021-11-21 15:18:39 +01:00
parent d710c2631a
commit bb1e314260
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
2 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,8 @@ Saves from 5.0.0 are compatible with 5.0.1.
## Fixes
* **[Mission Generation]** Fixed mission scripting error when using a dedicated server.
# 5.0.0
Saves from 4.x are not compatible with 5.0.

View File

@ -600,7 +600,7 @@ class HelipadGenerator:
for i, helipad in enumerate(self.cp.helipads):
name = self.cp.name + "_helipad_" + str(i)
logging.info("Generating helipad static : " + name)
pad = InvisibleFARP(name=name)
pad = InvisibleFARP(unit_id=self.m.next_unit_id(), name=name)
pad.position = Point(helipad.x, helipad.y)
pad.heading = helipad.heading.degrees
sg = unitgroup.StaticGroup(self.m.next_group_id(), name)