fixed bug which made unit movement less smooth than it could be
This commit is contained in:
parent
c90661fcc8
commit
05d39c09b7
2 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -151,8 +151,6 @@ void move_unit_between(display& disp, const gamemap& map, const gamemap::locatio
|
|||
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;
|
||||
|
@ -169,9 +167,7 @@ void move_unit_between(display& disp, const gamemap& map, const gamemap::locatio
|
|||
|
||||
const int new_ticks = SDL_GetTicks();
|
||||
const int wait_time = time_between_frames - (new_ticks - ticks);
|
||||
if(wait_time > 0) {
|
||||
SDL_Delay(wait_time);
|
||||
}
|
||||
SDL_Delay(maximum<int>(wait_time,1));
|
||||
|
||||
ticks = SDL_GetTicks();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue