forked from mirror/OpenTTD
(svn r3887) Add a function to get the other bridge end when you're at a bridge ramp
This commit is contained in:
17
bridge_map.c
Normal file
17
bridge_map.c
Normal file
@@ -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;
|
||||
}
|
Reference in New Issue
Block a user