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

AITile.IsBuildableRectangle does not test for invalid tile in all cases #5754

Closed
DorpsGek opened this issue Sep 18, 2013 · 1 comment
Closed
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Bolt opened the ticket and wrote:

tested in r25779M

The function AITile.IsBuildableRectangle can report the result is buildable on an invalid tile. The issue makes it harder to use the function around the edges of the map and seperate boundry tests are required to ensure a vaild tile is used prior to calling this function.

the following should return a false, however they are returning true:
AITile.IsBuildableRectangle(AIMap.GetTileIndex(-1, -1), 1, 1)
AITile.IsBuildableRectangle(AIMap.GetTileIndex(-1, -1), 2, 2)

the attached patch adds the required test the the IsBuildableRectangle function

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5754
@DorpsGek
Copy link
Member Author

DorpsGek commented Oct 6, 2013

frosch closed the ticket.

Reason for closing: Fixed

in r25815. Thanks for the patch!


This comment was imported from FlySpray: https://bugs.openttd.org/task/5754

@DorpsGek DorpsGek closed this as completed Oct 6, 2013
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant