projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b636dda
)
fixed bug which caused tux to "swing" on low frame rates
author
Tobias Gläßer
<tobi.web@gmx.de>
Sun, 29 Feb 2004 21:59:17 +0000
(21:59 +0000)
committer
Tobias Gläßer
<tobi.web@gmx.de>
Sun, 29 Feb 2004 21:59:17 +0000
(21:59 +0000)
SVN-Revision: 161
src/gameloop.c
patch
|
blob
|
history
src/player.c
patch
|
blob
|
history
diff --git
a/src/gameloop.c
b/src/gameloop.c
index
5c6f4c9
..
199546c
100644
(file)
--- a/
src/gameloop.c
+++ b/
src/gameloop.c
@@
-686,7
+686,7
@@
int gameloop(char * subset, int levelnb, int mode)
}
if(tux.input.down == DOWN)
}
if(tux.input.down == DOWN)
- SDL_Delay(
30
);
+ SDL_Delay(
45
);
/*Draw the current scene to the screen */
/*If the machine running the game is too slow
/*Draw the current scene to the screen */
/*If the machine running the game is too slow
diff --git
a/src/player.c
b/src/player.c
index
44d5830
..
9423b10
100644
(file)
--- a/
src/player.c
+++ b/
src/player.c
@@
-882,9
+882,17
@@
void player_input(player_type *pplayer)
else
{
if(pplayer->base.xm > 0)
else
{
if(pplayer->base.xm > 0)
- pplayer->base.xm = (int)(pplayer->base.xm - frame_ratio);
+ {
+ pplayer->base.xm = (int)(pplayer->base.xm - frame_ratio);
+ if(pplayer->base.xm < 0)
+ pplayer->base.xm = 0;
+ }
else if(pplayer->base.xm < 0)
else if(pplayer->base.xm < 0)
- pplayer->base.xm = (int)(pplayer->base.xm + frame_ratio);
+ {
+ pplayer->base.xm = (int)(pplayer->base.xm + frame_ratio);
+ if(pplayer->base.xm > 0)
+ pplayer->base.xm = 0;
+ }
}
/* Jump/jumping? */
}
/* Jump/jumping? */