---
src/map/water.cpp | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/map/water.cpp b/src/map/water.cpp
index 3dde859..a1fbbcc 100644
--- a/src/map/water.cpp
+++ b/src/map/water.cpp
@@ -162,12 +162,11 @@ void Water::Refresh()
}
// Height Calculation:
- Time * global_time = Time::GetInstance();
- if (time_raise < global_time->Read())
+ if (time_raise < now)
{
- m_last_preview_redraw = global_time->Read();
- if (time_raise + GO_UP_OSCILLATION_TIME * 1000 > global_time->Read()) {
- uint dt = global_time->Read() - time_raise;
+ m_last_preview_redraw = now;
+ if (time_raise + GO_UP_OSCILLATION_TIME * 1000 > now) {
+ uint dt = now - time_raise;
height_mvt = GO_UP_STEP +
(uint)(((float)GO_UP_STEP *
sin(((float)(dt*(GO_UP_OSCILLATION_NBR-0.25))
--
1.5.4.3
_______________________________________________
Wormux-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-dev