Opened 8 years ago

Last modified 4 years ago

#4066 new enhancement

In some cases AddEntity tries to use already occupied Entity IDs — at Initial Version

Reported by: AlThePhoenix Owned by:
Priority: If Time Permits Milestone: Backlog
Component: Maps Keywords:
Cc: Patch:

Description

Attached is an addition to the GarrisonHolder component which makes it possible to make entities come with a starting garrison once they are created.

Basically, AddEntity() seems to be unable to check what the last used EntityID on a map is. For example: If a carrier (this is the definition we're going to use for the unit with the StartingGarrison) is placed as the 5th entity on the map and its garrison consists of 4 units, the garrisoned units will use IDs from 6 to 9. This causes a crash if more entities were placed on the map after placing the carrier (place the carrier at ID 5, place something else at ID 6, a house for example -> conflict).

What should happen: Instead, AddEntity() should be able to check what the highest EntityID is on the map that is being loaded and use IDs after that or there should be an alternate function that does this.

Change History (1)

by AlThePhoenix, 8 years ago

Attachment: GarrisonHolder_Mod.js added

Tested with Alpha 20

Note: See TracTickets for help on using tickets.