summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-03-09 20:41:27 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-03-09 20:41:27 +0000
commit4e2ced304a2013808b2481cceb7622848b073e5b (patch)
tree2cc2c6cbc3f6e17842919530d583f91256dc86e1 /src/utils
parent15014d358424bf5f74a2d9b7afd08692b591a448 (diff)
downloadMana-4e2ced304a2013808b2481cceb7622848b073e5b.tar.gz
Mana-4e2ced304a2013808b2481cceb7622848b073e5b.tar.bz2
Mana-4e2ced304a2013808b2481cceb7622848b073e5b.tar.xz
Mana-4e2ced304a2013808b2481cceb7622848b073e5b.zip
Implemented possibility to rotate particle emitters. Implemented interpretation of the attacktype parameter of attack messages and visualize monster attacks other than id 1 with a particle effect. Prepared to get attack particle effects and animation types from the monster database.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/minmax.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/utils/minmax.h b/src/utils/minmax.h
index 427c5da7..353c60e7 100644
--- a/src/utils/minmax.h
+++ b/src/utils/minmax.h
@@ -40,6 +40,27 @@ template <typename T> struct MinMax
set(val, val);
}
+ bool operator+= (T arg)
+ {
+ minVal += arg;
+ maxVal += arg;
+ return true;
+ }
+
+ bool operator-= (T arg)
+ {
+ minVal -= arg;
+ maxVal -= arg;
+ return true;
+ }
+
+ bool operator*= (T arg)
+ {
+ minVal *= arg;
+ maxVal *= arg;
+ return true;
+ }
+
T value()
{
return (T)(minVal + (maxVal - minVal) * (rand() / ((double) RAND_MAX + 1)));