Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On 4_5_126 : Wrong zone coordinates.Point for zone linked to unit #102

Open
FullGas1 opened this issue Oct 22, 2024 · 0 comments
Open

On 4_5_126 : Wrong zone coordinates.Point for zone linked to unit #102

FullGas1 opened this issue Oct 22, 2024 · 0 comments

Comments

@FullGas1
Copy link

The mist.getUnitsInZones function does not seem to work when applied to a zone linked to a unit.

This is because this function retrieves the coordinates of the zone in mist.DBs.zonesByName or mist.DBs.zonesByNum. Unfortunately, in this tables the coordinates of the linked zones are the offset and not the real coordinates of the zone. Furthermore, these tables do not take into account the movements of the zone that has become mobile due to its link.

For everything to work, it would be necessary either:
1> that the real coordinates of the zone (= coordinates of the reference unit + offset) are present in the zone tables, and plan an update of the coordinates of these tables to take into account their possible movement.

2> that the functions that need the coordinates of a linked zone use trigger.misc.getZone() which returns the real coordinates of a mobile zone even when it follows a moving unit.

3> find another better solution ?

Thank you in advance for seeing what can be done about this.
Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant