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

Features are not angled correctly when rotated #4136

Open
aco4 opened this issue Nov 19, 2024 · 0 comments
Open

Features are not angled correctly when rotated #4136

aco4 opened this issue Nov 19, 2024 · 0 comments
Labels

Comments

@aco4
Copy link
Contributor

aco4 commented Nov 19, 2024

Screenshot

In the image below, the oil derrick should be angled towards the East, since the terrain slopes down towards the east. But it has been rotated 180 degrees, causing it to be angled towards the West instead.
wz2100-20241118_195008-Lekiro-T1

To Reproduce

Start a skirmish game with the script-generated map below (rename .zip to .wz)

10c-Lekiro.zip

The oil derricks are rotated with the following script:

features.push({
    name: "OilResource",
    ...
    direction: gameRand(4) * 0x4000,
});

This gives them a random rotation of 0, 90, 180, or 270 degrees. Thus, about 1/4 of the oil derricks in the map have a rotation of 0 degrees and are angled correctly. The other 3/4 are angled incorrectly.

Expected Behavior

The feature should be angled correctly regardless of rotation

System

  • OS: Windows 11
  • Game version: 4.5.5

Additional Context

I expect that issue is not limited to script-generated maps, and occurs in hand-made maps as well. Needs testing.

@aco4 aco4 added the Bug label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant