From 4e2ced304a2013808b2481cceb7622848b073e5b Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Sun, 9 Mar 2008 20:41:27 +0000 Subject: 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. --- src/utils/minmax.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/utils') 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 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))); -- cgit v1.2.3-70-g09d2