Changeset - r21793:27170047e8bb
[Not reviewed]
master
0 1 0
rubidium - 10 years ago 2014-09-29 19:04:02
rubidium@openttd.org
(svn r26938) -Codechange: simplify RandomHeight significantly
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/tgp.cpp
Show inline comments
 
@@ -281,11 +281,8 @@ static inline void FreeHeightMap()
 
 */
 
static inline height_t RandomHeight(amplitude_t rMax)
 
{
 
	amplitude_t ra = (Random() << 16) | (Random() & 0x0000FFFF);
 
	height_t rh;
 
	/* Spread height into range -rMax..+rMax */
 
	rh = A2H(ra % (2 * rMax + 1) - rMax);
 
	return rh;
 
	return A2H(RandomRange(2 * rMax + 1) - rMax);
 
}
 

	
 
/**
0 comments (0 inline, 0 general)