I am using the new c++ interface to write an AI for Balanced Annihilation. I use the function mentioned in the topic to find out where there is metal on given map. However, on some maps the values returned by the function are wrong and my AI ends up building metal extractors on non-metal spots.
Maps where the function does not return correct values:
DeltaSiegeDry
Eye Of Horus v2
On the other hand it works fine on these maps:
Archers Valley v5
Adamantine Mountian v1
Anyone knows of this problem and how to fix it?
New c++ interface: GetResourceMapSpotsPositions() broken?
Moderators: hoijui, Moderators
-
- Posts: 3
- Joined: 07 Sep 2009, 20:37
Re: New c++ interface: GetResourceMapSpotsPositions() broken?
I've tested it, the function seems to have a bug. My ai also tries to build at non-metal spots.
Other ai's often use their own function to get metal spots...
I've filled a bug report: http://springrts.com/mantis/view.php?id=1656
It seems to be fixed in git.
Other ai's often use their own function to get metal spots...
I've filled a bug report: http://springrts.com/mantis/view.php?id=1656
It seems to be fixed in git.
Re: New c++ interface: GetResourceMapSpotsPositions() broken?
yeah, kloot fixed it wiht this:
was me doign ti wrong:
DOH!
Code: Select all
- MapHeight = resourceHandler->GetResourceMapWidth(ResourceId);
- MapWidth = resourceHandler->GetResourceMapHeight(ResourceId);
+ MapWidth = resourceHandler->GetResourceMapWidth(ResourceId);
+ MapHeight = resourceHandler->GetResourceMapHeight(ResourceId);
DOH!