A little work on Dart and DartTrap
authorChristoph Sommer <mail@christoph-sommer.de>
Sun, 9 Jul 2006 16:29:12 +0000 (16:29 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Sun, 9 Jul 2006 16:29:12 +0000 (16:29 +0000)
SVN-Revision: 3972

data/images/creatures/dart/dart.sprite
data/images/creatures/dart/flying.png
data/levels/world2/christoph5.stl
src/badguy/darttrap.cpp

index 6242395..9bdfac2 100644 (file)
@@ -1,12 +1,12 @@
 (supertux-sprite
   (action
     (name "flying-left")
-    (hitbox 3 3 9 1)
+    (hitbox 12 15 9 1)
     (images "flying.png")
     )
   (action
     (name "flying-right")
-    (hitbox 3 3 9 1)
+    (hitbox 11 15 9 1)
     (mirror-action "flying-left")
     )
   )
index f817c77..682b379 100644 (file)
Binary files a/data/images/creatures/dart/flying.png and b/data/images/creatures/dart/flying.png differ
index 9c0ba8e..2966f61 100755 (executable)
@@ -91,7 +91,7 @@
       (initial-delay 0)
       (fire-delay 2)
       (ammo -1)
-      (direction "auto")
+      (direction "left")
       (x 3508.683)
       (y 1053.549)
     )
@@ -99,7 +99,7 @@
       (initial-delay 0)
       (fire-delay 2)
       (ammo -1)
-      (direction "auto")
+      (direction "left")
       (x 3509.025)
       (y 1137.339)
     )
       (initial-delay 0)
       (fire-delay 2)
       (ammo -1)
-      (direction "auto")
+      (direction "left")
       (x 5364.84)
       (y 1279.908)
     )
       (initial-delay 0)
       (fire-delay 2)
       (ammo -1)
-      (direction "auto")
-      (x 5364.84)
-      (y 1399.408)
+      (direction "right")
+      (x 4992)
+      (y 1392)
     )
     (igel
       (x 3927.36)
index 0cd6249..abada3b 100644 (file)
@@ -27,13 +27,14 @@ namespace {
 }
 
 DartTrap::DartTrap(const lisp::Lisp& reader) 
-       : BadGuy(reader, "images/creatures/darttrap/darttrap.sprite"), initial_delay(0), fire_delay(2), ammo(-1), state(IDLE)
+       : BadGuy(reader, "images/creatures/darttrap/darttrap.sprite", LAYER_TILES-1), initial_delay(0), fire_delay(2), ammo(-1), state(IDLE)
 {
   reader.get("initial-delay", initial_delay);
   reader.get("fire-delay", fire_delay);
   reader.get("ammo", ammo);
   countMe = false;
   sound_manager->preload("sounds/dartfire.wav");
+  if (start_dir == AUTO) log_warning << "Setting a DartTrap's direction to AUTO is no good idea" << std::endl;
 }
 
 void
@@ -53,6 +54,7 @@ DartTrap::activate()
 {
   state = IDLE;
   sprite->set_action(dir == LEFT ? "idle-left" : "idle-right");
+  set_group(COLGROUP_DISABLED);
 
   if (initial_delay == 0) initial_delay = 0.1;
   fire_timer.start(initial_delay);