1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-25 07:29:10 +00:00

(svn r3779) Move CheckTunnelInWay() to a more appropriate place, invert its result and give it a less ambiguous name (IsTunnelInWay)

This commit is contained in:
tron
2006-03-07 07:51:05 +00:00
parent a172b194c2
commit 313754011d
5 changed files with 32 additions and 34 deletions

View File

@@ -10,6 +10,7 @@
#include "tile.h"
#include "viewport.h"
#include "command.h"
#include "tunnel_map.h"
#include "variables.h"
#include "table/sprites.h"
@@ -277,7 +278,7 @@ int32 CmdTerraformLand(int x, int y, uint32 flags, uint32 p1, uint32 p2)
t = TerraformGetHeightOfTile(&ts, tile + TileDiffXY(0, 1));
if (t <= z) z = t;
if (!CheckTunnelInWay(tile, z * 8)) {
if (IsTunnelInWay(tile, z * 8)) {
return_cmd_error(STR_1002_EXCAVATION_WOULD_DAMAGE);
}
}