rnd-20030913-2-src
[rocksndiamonds.git] / src / events.c
index b1c15e9fc8a8e09069c64984b52e4bfb9b81c439..f060c0ff1d9ec1aa11df94b283fa994788efcb6e 100644 (file)
@@ -432,6 +432,7 @@ void HandleButton(int mx, int my, int button)
          printf("      MovDelay[%d][%d] == %d\n", x,y, MovDelay[x][y]);
          printf("      ChangeDelay[%d][%d] == %d\n", x,y, ChangeDelay[x][y]);
          printf("      GfxElement[%d][%d] == %d\n", x,y, GfxElement[x][y]);
+         printf("      GfxAction[%d][%d] == %d\n", x,y, GfxAction[x][y]);
          printf("\n");
        }
       }
@@ -792,9 +793,16 @@ void HandleKey(Key key, int key_status)
 
        case KSYM_Q:
        case KSYM_q:
-         local_player->dynamite = 1000;
-         break;
+         {
+           int i;
 
+           for (i=0; i < MAX_INVENTORY_SIZE; i++)
+             if (local_player->inventory_size < MAX_INVENTORY_SIZE)
+               local_player->inventory_element[local_player->inventory_size++] =
+                 EL_DYNAMITE;
+         }
+
+         break;
 
 
 #if 0