mail[Wesnoth-commits] r33265 - /trunk/src/unit_animation.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on March 01, 2009 - 21:13:
Author: silene
Date: Sun Mar  1 21:13:17 2009
New Revision: 33265

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33265&view=rev
Log:
Prevent excessive delay at low animation speeds.

Modified:
    trunk/src/unit_animation.cpp

Modified: trunk/src/unit_animation.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=33265&r1=33264&r2=33265&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Sun Mar  1 21:13:17 2009
@@ -941,7 +941,7 @@
         disp->draw();
         events::pump();
        int end_tick = 
animated_units_[0].my_unit->get_animation()->time_to_tick(animation_time);
-       while (SDL_GetTicks() < (unsigned int)end_tick - 20/speed) {
+       while (SDL_GetTicks() < (unsigned int)end_tick - 
std::min<int>(20/speed,20)) {
                disp->delay(std::max<int>(0,
                        std::min<int>(10,
                        static_cast<int>((animation_time - 
get_animation_time()) * speed))));




Related Messages


Powered by MHonArc, Updated Sun Mar 01 21:20:06 2009