changeset 3214 | dd744119dfac |
child 3225 | 3a3e35bd39a6 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bridge_map.c Wed Mar 15 16:44:50 2006 +0000 @@ -0,0 +1,17 @@ +/* $Id$ */ + +#include "stdafx.h" +#include "openttd.h" +#include "bridge_map.h" + + +TileIndex GetOtherBridgeEnd(TileIndex tile) +{ + TileIndexDiff delta = TileOffsByDir(GetBridgeRampDirection(tile)); + + do { + tile += delta; + } while (!IsBridgeRamp(tile)); + + return tile; +}