Made code -Wshadow clean
[supertux.git] / src / badguy / goldbomb.cpp
index 1fbe184..fa180ea 100644 (file)
@@ -191,27 +191,27 @@ GoldBomb::grab(MovingObject& object, const Vector& pos, Direction dir)
 }
 
 void
-GoldBomb::ungrab(MovingObject& object, Direction dir)
+GoldBomb::ungrab(MovingObject& object, Direction dir_)
 {
   int toss_velocity_x = 0;
   int toss_velocity_y = 0;
   Player* player = dynamic_cast<Player*> (&object);
 
   // toss upwards
-  if(dir == UP)
+  if(dir_ == UP)
     toss_velocity_y += -500;
 
   // toss to the side when moving sideways
-  if(player && player->physic.get_velocity_x()*(dir == LEFT ? -1 : 1) > 1) {
-    toss_velocity_x += (dir == LEFT) ? -200 : 200;
+  if(player && player->physic.get_velocity_x()*(dir_ == LEFT ? -1 : 1) > 1) {
+    toss_velocity_x += (dir_ == LEFT) ? -200 : 200;
     toss_velocity_y = (toss_velocity_y < -200) ? toss_velocity_y : -200;
     // toss farther when running
-    if(player && player->physic.get_velocity_x()*(dir == LEFT ? -1 : 1) > 200)
-      toss_velocity_x += player->physic.get_velocity_x()-(190*(dir == LEFT ? -1 : 1));
+    if(player && player->physic.get_velocity_x()*(dir_ == LEFT ? -1 : 1) > 200)
+      toss_velocity_x += player->physic.get_velocity_x()-(190*(dir_ == LEFT ? -1 : 1));
   }
   log_warning << toss_velocity_x << toss_velocity_y << std::endl;////
 
-  //set_pos(object.get_pos() + Vector((dir == LEFT ? -33 : 33), get_bbox().get_height()*0.66666 - 32));
+  //set_pos(object.get_pos() + Vector((dir_ == LEFT ? -33 : 33), get_bbox().get_height()*0.66666 - 32));
   physic.set_velocity(toss_velocity_x, toss_velocity_y);
   set_colgroup_active(COLGROUP_MOVING);
   grabbed = false;