From: Christoph Sommer Date: Sun, 9 Jul 2006 16:29:12 +0000 (+0000) Subject: A little work on Dart and DartTrap X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=2b8d80f0731c3a0b482212fa1cabf4e19b946c38;p=supertux.git A little work on Dart and DartTrap SVN-Revision: 3972 --- diff --git a/data/images/creatures/dart/dart.sprite b/data/images/creatures/dart/dart.sprite index 624239554..9bdfac2f5 100644 --- a/data/images/creatures/dart/dart.sprite +++ b/data/images/creatures/dart/dart.sprite @@ -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") ) ) diff --git a/data/images/creatures/dart/flying.png b/data/images/creatures/dart/flying.png index f817c77e7..682b379fd 100644 Binary files a/data/images/creatures/dart/flying.png and b/data/images/creatures/dart/flying.png differ diff --git a/data/levels/world2/christoph5.stl b/data/levels/world2/christoph5.stl index 9c0ba8e3e..2966f610c 100755 --- a/data/levels/world2/christoph5.stl +++ b/data/levels/world2/christoph5.stl @@ -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) ) @@ -107,7 +107,7 @@ (initial-delay 0) (fire-delay 2) (ammo -1) - (direction "auto") + (direction "left") (x 5364.84) (y 1279.908) ) @@ -115,9 +115,9 @@ (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) diff --git a/src/badguy/darttrap.cpp b/src/badguy/darttrap.cpp index 0cd62497a..abada3ba3 100644 --- a/src/badguy/darttrap.cpp +++ b/src/badguy/darttrap.cpp @@ -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);