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

Fix rarity in town_cmd.c #49

Closed
DorpsGek opened this issue Feb 3, 2006 · 2 comments
Closed

Fix rarity in town_cmd.c #49

DorpsGek opened this issue Feb 3, 2006 · 2 comments
Labels
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

DorpsGek commented Feb 3, 2006

Rubidium opened the ticket and wrote:

town_cmd.c at about row 815 has the following statements:
...
// Only work with plain land that not already has a house with map5=0
if (ti.tileh == 0 && (ti.type != MP_HOUSE || ti.map5 != 0)) {
if (!CmdFailed(DoCommandByTile(tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) {
DoCommandByTile(tile, GenRandomRoadBits(), t->index, DC_EXEC | DC_AUTO, CMD_BUILD_ROAD);
...

The problem is that 'ti.map5 != 0' part of the if-statements makes no sense.
What it means is that it only allows destroying houses when they are in some, but not all, stages of construction and it allows destroying finished houses with a lift.

The original meaning probably was that it only may destroy houses when they are in development. On the other hand, http://svn.openttd.org/cgi-bin/trac.cgi/browser/branch/map completly removes the part.

So I've created two patches, one that changes the 'ti.map5 != 0' to 'building not finished', meaning that no finished house will be replaced by a road, and the other removes the complete part, meaning that no house will be replaced by a road.

Attachments

Reported version: trunk
Operating system: All


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

DorpsGek commented Feb 3, 2006

peter1138 wrote:

I'd say the latter meaning makes more sense.


This comment was imported from FlySpray: https://bugs.openttd.org/task/49#comment98

@DorpsGek
Copy link
Member Author

TrueBrain closed the ticket.

Reason for closing: Implemented

Added to SVN


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

@DorpsGek DorpsGek added Core 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 labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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