you can move right or left, while jumping, now
authorTobias Gläßer <tobi.web@gmx.de>
Sun, 14 Mar 2004 00:39:43 +0000 (00:39 +0000)
committerTobias Gläßer <tobi.web@gmx.de>
Sun, 14 Mar 2004 00:39:43 +0000 (00:39 +0000)
SVN-Revision: 208

src/player.c

index add399e..2ff9706 100644 (file)
@@ -191,7 +191,7 @@ void player_action(player_type* pplayer)
 
           score_multiplier = 1;
         }
-       
+
       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)
 {
-  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))