projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
482a326
)
you can move right or left, while jumping, now
author
Tobias Gläßer
<tobi.web@gmx.de>
Sun, 14 Mar 2004 00:39:43 +0000
(
00:39
+0000)
committer
Tobias Gläßer
<tobi.web@gmx.de>
Sun, 14 Mar 2004 00:39:43 +0000
(
00:39
+0000)
SVN-Revision: 208
src/player.c
patch
|
blob
|
history
diff --git
a/src/player.c
b/src/player.c
index
add399e
..
2ff9706
100644
(file)
--- a/
src/player.c
+++ b/
src/player.c
@@
-191,7
+191,7
@@
void player_action(player_type* pplayer)
score_multiplier = 1;
}
score_multiplier = 1;
}
-
+
if(jumped_in_solid == YES)
{
if(jumped_in_solid == YES)
{
@@
-358,18
+358,17
@@
int player_under_solid(player_type *pplayer)
void player_handle_horizontal_input(player_type *pplayer, int dir)
{
void player_handle_horizontal_input(player_type *pplayer, int dir)
{
- if (pplayer->jumping == NO)
+
+ if ((dir ? (pplayer->base.xm < -SKID_XM) : (pplayer->base.xm > SKID_XM)) && !timer_started(&pplayer->skidding_timer) &&
+ pplayer->dir == !dir)
{
{
- if ((dir ? (pplayer->base.xm < -SKID_XM) : (pplayer->base.xm > SKID_XM)) && !timer_started(&pplayer->skidding_timer) &&
- pplayer->dir == !dir)
- {
- timer_start(&pplayer->skidding_timer, SKID_TIME);
+ timer_start(&pplayer->skidding_timer, SKID_TIME);
-
play_sound(sounds[SND_SKID], SOUND_CENTER_SPEAKER);
+ play_sound(sounds[SND_SKID], SOUND_CENTER_SPEAKER);
- }
- pplayer->dir = dir;
}
}
+ pplayer->dir = dir;
+
if ((dir ? (pplayer->base.xm < 0) : (pplayer->base.xm > 0)) && !isice(pplayer->base.x, pplayer->base.y + pplayer->base.height) &&
!timer_started(&pplayer->skidding_timer))
if ((dir ? (pplayer->base.xm < 0) : (pplayer->base.xm > 0)) && !isice(pplayer->base.x, pplayer->base.y + pplayer->base.height) &&
!timer_started(&pplayer->skidding_timer))