Author: boucman
Date: Sat Apr 30 16:21:51 2011
New Revision: 49336

URL: http://svn.gna.org/viewcvs/wesnoth?rev=49336&view=rev
Log:
fix animation freeze in some special cases

Modified:
    trunk/src/animated.i

Modified: trunk/src/animated.i
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/animated.i?rev=49336&r1=49335&r2=49336&view=diff
==============================================================================
--- trunk/src/animated.i (original)
+++ trunk/src/animated.i Sat Apr 30 16:21:51 2011
@@ -140,7 +140,7 @@
        }
        if(cycles_) {
                while(get_animation_time() > get_end_time()){  // cut extra time
-                       start_tick_ += 
static_cast<int>(get_animation_duration()/acceleration_);
+                       start_tick_ += 
std::max<int>(static_cast<int>(get_animation_duration()/acceleration_),1);
                        current_frame_key_ = 0;
                }
        }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to