wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth ./changelog src/unit_display.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth ./changelog src/unit_display.cpp
Date: Sun, 30 Jan 2005 22:02:38 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/01/31 03:02:38

Modified files:
        .              : changelog 
        src            : unit_display.cpp 

Log message:
        fixed bug which made unit movement less smooth than it could be

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/changelog.diff?tr1=1.473&tr2=1.474&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/unit_display.cpp.diff?tr1=1.46&tr2=1.47&r1=text&r2=text

Patches:
Index: wesnoth/changelog
diff -u wesnoth/changelog:1.473 wesnoth/changelog:1.474
--- wesnoth/changelog:1.473     Sun Jan 30 15:35:07 2005
+++ wesnoth/changelog   Mon Jan 31 03:02:38 2005
@@ -1,4 +1,5 @@
 CVS HEAD:
+ * fix to bug which caused unnecessary waits during unit movement; should make 
unit movement much smoother.
  * user interface tweaks
  * updated translations:
   * catalan
Index: wesnoth/src/unit_display.cpp
diff -u wesnoth/src/unit_display.cpp:1.46 wesnoth/src/unit_display.cpp:1.47
--- wesnoth/src/unit_display.cpp:1.46   Sat Jan 29 00:30:03 2005
+++ wesnoth/src/unit_display.cpp        Mon Jan 31 03:02:38 2005
@@ -151,8 +151,6 @@
                disp.draw_tile(a.x, a.y);
                for(int tile = 0; tile != 6; ++tile)
                        disp.draw_tile(src_adjacent[tile].x, 
src_adjacent[tile].y);
-               // disp.invalidate_animations();
-               disp.draw(false);
 
                if (!teleport_unit) {
                        const int height_adjust = src_height_adjust + 
(dst_height_adjust - src_height_adjust) * i / nsteps;
@@ -168,10 +166,8 @@
                }
 
                const int new_ticks = SDL_GetTicks();
-               const int wait_time = time_between_frames - (new_ticks - ticks);
-               if(wait_time > 0) {
-                       SDL_Delay(wait_time);
-               }
+               const int wait_time = time_between_frames - (new_ticks - ticks);
+               SDL_Delay(maximum<int>(wait_time,1));
 
                ticks = SDL_GetTicks();
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]