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

game.enemy().getUnits() returns garbage when an initially observed enemy unit goes into FOW #39

Open
decisivesacha opened this issue Sep 12, 2018 · 0 comments

Comments

@decisivesacha
Copy link

I have a loop which is the following:

for(Unit unit: game.enemy().getUnits()){
    x = unit.getPosition().getX();
    y = unit.getPosition().getY();
}

When the enemy unit is visible, I get reasonable values for x and y such as (1280, 1104) on a 128x128 map which is 4096x4096 pixels. However, when the enemy unit goes back into the fog of war, the values I receive for x and a y are 32000, 32064. The unit type is unknown and the hit points are zero, however the ID stays the same. Is this the expected behavior? Shouldn't the game only return an enemy unit if the enemy unit if the it is visible to the player?

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