Pity. But I can live with thatBilbo wrote:As I looked in the patch - since it modifies the network protocol for leveling and clearing area by adding flag for dialognal clear ... no. Unfortunately, it is not network compatible.
![Wink :wink:](./images/smilies/icon_wink.gif)
Moderator: OpenTTD Developers
Pity. But I can live with thatBilbo wrote:As I looked in the patch - since it modifies the network protocol for leveling and clearing area by adding flag for dialognal clear ... no. Unfortunately, it is not network compatible.
Well, yes, it's obvious to you and me - we've both been programming for quite some time.What's the return value of || or && ? Obviously boolean, since they're logic operators, so no need for the if.
Code: Select all
BEGIN_TILE_LOOP(tile2, size_x, size_y, tile) {
curh = TileHeight(tile2);
while (curh != h) {
ret = DoCommand(tile2, 8, (curh > h) ? 0 : 1, flags & ~DC_EXEC, CMD_TERRAFORM_LAND);
if (CmdFailed(ret)) break;
if (flags & DC_EXEC) {
money.AddCost(-ret.GetCost());
if (money.GetCost() < 0) {
_additional_cash_required = ret.GetCost();
return cost;
}
DoCommand(tile2, 8, (curh > h) ? 0 : 1, flags, CMD_TERRAFORM_LAND);
}
cost.AddCost(ret);
curh += (curh > h) ? -1 : 1;
}
} END_TILE_LOOP(tile2, size_x, size_y, tile)
Code: Select all
for (int x = sx; x <= ex; ++x) {
for (int y = sy; y <= ey; ++y) {
curh = TileHeight(TileXY(x, y));
while (curh != h) {
ret = DoCommand(TileXY(x, y), 8, (curh > h) ? 0 : 1, flags & ~DC_EXEC, CMD_TERRAFORM_LAND);
if (CmdFailed(ret)) {
money.AddCost(-ret.GetCost());
curh += (curh > h) ? -1 : 1;
continue;
}
/* To be able to determine how much the operation will cost, add the cost to cost. */
cost.AddCost(ret);
if (flags & DC_EXEC) {
money.AddCost(-ret.GetCost());
if (money.GetCost() < 0) {
_additional_cash_required = ret.GetCost();
/* Remove cost for not executed DoCommand from cost. So it is not billed anyway.*/
cost.AddCost(-ret.GetCost());
return cost;
}
DoCommand(TileXY(x, y), 8, (curh > h) ? 0 : 1, flags, CMD_TERRAFORM_LAND);
}
curh += (curh > h) ? -1 : 1;
}
}
}
I agree with that. I have never missed that freedraw mode (I don't want to say it isn't useful for others, especially in the scenario editor which I have never really used), but I miss diagonal leveling almost every time I build diagonal rails.Bilbo wrote:Since IMHO more people woudl use then 45 rotated levelling, perhaps it can be even the 'default' with old keyboard shortcut and the freedraw mode will get 'Z' as shortcut (or let people configure it in patches)
http://hg.openttd.org/openttd/trunk.hg/log?rev=diagonal leads to 13 December 2010kyosuke1989 wrote:When this patch was integrated in trunk?
Users browsing this forum: No registered users and 10 guests