summaryrefslogtreecommitdiff
path: root/src/tgp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tgp.cpp')
-rw-r--r--src/tgp.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp
index 225f3bb71..7889fc17e 100644
--- a/src/tgp.cpp
+++ b/src/tgp.cpp
@@ -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);
}
/**