xsCreateUnit creates unit in wrong location [Mac only]

:play_button: GAME INFORMATION

:backhand_index_pointing_down: These details are CRITICAL; DO NOT skip them or your issue may not be reviewed.

  • GAME BUILD #: 101.103.48987.0 (#180059)(1.1.2RC1) 24094652
  • GAME PLATFORM: Steam
  • OPERATING SYSTEM: Mac

:play_button: ISSUE EXPERIENCED

:backhand_index_pointing_down: DESCRIBE THE ISSUE IN DETAIL (below). LIMIT TO ONE BUG PER THREAD.

When calling xsCreateUnit(.., pos, ..) with a position vector pos that was defined earlier in the function, the unit spawns somewhere other than pos if there is other, completely unrelated code in between (such as printing a string literal).

It seems to be about reading from the wrong memory address, because printing pos afterwards shows correct values.

Other arguments to xsCreateUnit also have issues: xsCreateUnit parses bool arguments incorrectly [Mac only]

:play_button: FREQUENCY OF ISSUE

:backhand_index_pointing_down: How often does the issue occur? CHOSE ONE; DELETE THE REST !

  • 100% of the time / matches I play (ALWAYS)

:play_button: REPRODUCTION STEPS

:backhand_index_pointing_down: List CLEAR and DETAILED STEPS we can take to reproduce the issue ourselves… Be descriptiv e!

Here’s the steps to reproduce the issue:

  1. Download the attached scenario and the associated xs script (rename from .txt to.xs)

  2. Play the scenario on Mac and see where the palisade spawns.

  3. Uncomment other unrelated code between pos = ... and xsCreateUnit and see other wrong positions.

:play_button: EXPECTED RESULT

:backhand_index_pointing_down: What was SUPPOSED to happen if the bug you encountered were not prese nt?

Unit should spawn in location given by the vector passed as argument.

:play_button: IMAGE

:backhand_index_pointing_down: ALWAYS attach a PICTURE (.jpg, .png, .gif) or VIDEO (.mp4, YouTube link) that highlights the prob lem.

:play_button: GAME FILES (SAVE / RECORDING)

:backhand_index_pointing_down: Attach a SAVE GAME (.aoe2spgame) or GAME RECORDING (.aoe2record) of the match where you encountered the issue. Link it below if using an external file ser vice.