diff --git a/changelog.txt b/changelog.txt
index aac5d735..58a9b0dc 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -57,6 +57,7 @@ Mapping
[*] entproperty now works in MP coop, but buffered.
[*] Textures can now have a non-default scale, definable through the texture command.
[*] Multiple selections support
+[*] Configurable wave height
Rendering / HUD / ...
---------------------
diff --git a/docs/reference.xml b/docs/reference.xml
index 683a31b6..a45a966c 100644
--- a/docs/reference.xml
+++ b/docs/reference.xml
@@ -1270,7 +1270,7 @@ echo foo
-
+
Adds a subarray to a cubescript multidimensional array. (alias)
@@ -1295,7 +1295,7 @@ echo foo
-
+
Adds a string to an existing subarray in a cubescript multidimensional array.
@@ -1319,7 +1319,7 @@ echo foo
-
+
Returns a subarray or a subarray element of a cubescript multidimensional array.
@@ -1344,7 +1344,7 @@ echo foo
-
+
Modifies a subarray element of a cubescript multidimensional array.
@@ -1353,7 +1353,7 @@ echo foo
Output: 1 2 9 4 5
-
+
@@ -1370,7 +1370,7 @@ echo foo
-
+
Deletes an entire subarray from an existing cubescript multidimensional array.
@@ -1387,7 +1387,7 @@ echo foo
-
+
Returns the number of subarrays in a cubescript multidimensional array.
@@ -1403,7 +1403,7 @@ echo foo
-
+
Returns a list of all subarray names in a cubescript multidimensional array.
@@ -1425,7 +1425,7 @@ echo foo
-
+
Returns a list of all subarray names that have content matching a specific keyword.
@@ -6968,6 +6968,11 @@ Output:
+
+ Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy).
+
+
+
diff --git a/source/src/water.cpp b/source/src/water.cpp
index bb3268e3..0d6385f1 100644
--- a/source/src/water.cpp
+++ b/source/src/water.cpp
@@ -25,6 +25,7 @@ void setwatercolor(const char *r, const char *g, const char *b, const char *a)
}
COMMANDN(watercolour, setwatercolor, ARG_4STR);
+FVAR(waveheight, 0, 0.3f, 1.0f);
// renders water for bounding rect area that contains water... simple but very inefficient
@@ -39,7 +40,7 @@ COMMANDN(watercolour, setwatercolor, ARG_4STR);
float angle = v1*v2*0.1f/(2*M_PI) + t; \
float s = angle - int(angle) - 0.5f; \
s *= 8 - fabs(s)*16; \
- float h = 0.3f*s; \
+ float h = waveheight*0.5f*s; \
varray::attrib(v1, v2, v3+h); \
body; \
}
@@ -51,7 +52,7 @@ COMMANDN(watercolour, setwatercolor, ARG_4STR);
})
#define VERTWT(vertwt, defbody, body) \
VERTWC(vertwt, defbody, { \
- float duv = 0.2f*v; \
+ float duv = waveheight*0.5f*v; \
body; \
})