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 b791ffc6: use the correct parameter in CmdSignalTrackHelper #9327

Merged
merged 1 commit into from Jun 1, 2021

Conversation

vituscze
Copy link
Contributor

@vituscze vituscze commented Jun 1, 2021

Motivation / Problem

b791ffc broke the "minimise gaps" mode of signal dragging.

Description

This PR just fixes the param1 renaming from the previously mentioned commit.

Limitations

No known limitations.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@rubidium42 rubidium42 merged commit c936f8b into OpenTTD:master Jun 1, 2021
@vituscze vituscze deleted the fix-signal-distance branch June 1, 2021 15:12
@vituscze
Copy link
Contributor Author

vituscze commented Jun 1, 2021

I'm going over the rest of the commit in detail and it looks like

OpenTTD/src/tree_cmd.cpp

Lines 451 to 464 in c936f8b

if (IsTileType(tile, MP_CLEAR)) {
/* Remove fields or rocks. Note that the ground will get barrened */
switch (GetRawClearGround(tile)) {
case CLEAR_FIELDS:
case CLEAR_ROCKS: {
CommandCost ret = DoCommand(current_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
cost.AddCost(ret);
break;
}
default: break;
}
}
has the same issue. Should I open a new PR?

@rubidium42
Copy link
Contributor

I'm going over the rest of the commit in detail and it looks like https://github.com/OpenTTD/OpenTTD/blob/master/src/tree_cmd.cpp#L451-L464 has the same issue. Should I open a new PR?

Yes please. And maybe hold up making a PR until you've checked the whole thing ;) Undoing the renames of the parameters and changing the variable names after the first PR comments wanting me to undo those did not go well it seems.

@vituscze
Copy link
Contributor Author

vituscze commented Jun 1, 2021

Yeah, sorry, I realized I should have checked the whole thing first just after I opened the PR.

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

Successfully merging this pull request may close these issues.

None yet

2 participants