From 2b8d80f0731c3a0b482212fa1cabf4e19b946c38 Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Sun, 9 Jul 2006 16:29:12 +0000 Subject: [PATCH] A little work on Dart and DartTrap SVN-Revision: 3972 --- data/images/creatures/dart/dart.sprite | 4 ++-- data/images/creatures/dart/flying.png | Bin 359 -> 845 bytes data/levels/world2/christoph5.stl | 12 ++++++------ src/badguy/darttrap.cpp | 4 +++- 4 files changed, 11 insertions(+), 9 deletions(-) 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 f817c77e73019960eb8004d4a88cf4dfeb6ac4b5..682b379fd20f884c9b90a351dda62043ee36e04d 100644 GIT binary patch delta 771 zcmV+e1N{8w0?h^?iBL{Q4GJ0x0000DNk~Le0000W0000W2nGNE0CReJ^pPPk2?q%f z7cX`1+_#ZiD}Ms9NklyKWOf6o$Xq9bXeWsT3DJQ>NlVM)@C;Nu z06mmQ@D7LqC=gbZh#*I?g6-JOX5+mt1!vL70unnxX?@$8QG|L31`8JOA3uGrLB z3)1HAHRjqBKyCf<|Al}6D?kI5{8kw_kN^>oT!e`F2Y+}Duw`gjYYBnGAP@tg+9J6W z0tR?qfD1C$27wp|0bhIs1Zs=;LIlRZ3qTQ=1IjYjvhx5K0j_v2BQ&WJ`VaGrKpCh4 zi@-Ht-XJgnhCp9@7MMxeB$y;7^w{n#c~%4}zzR?YYC@zaavuX7A&MMH77v#Ai51X> z0wvk~Dt~YtxCyL@Dk0F5qd|_t7asv}+B|<|=&^Xn6v&I@OF#qI5F!-;I+XvoqQ>ya z$Mww*!@`|WthAq~&#?1uni$APabk< z0*^+q-H5~7?KDjqyf~PcKn9)xp8^A*le7Iwt=dXzRVs1fgrK@9YA;Q#-Sob-SM5|! zo`3CDzxGBvAS&b(Y)_+rxpNP2B-%^z-T_Ls6-Sc)Z5iFCjnR*$7wo_3%)LGEb=(W= zqthuXVO9aNG+dSdT$W;#7m_Eyk<@~&DCJ5zPE-xYV<2lVzI+gwp9ol12|amsEXsIB zAxbaWjPzJPC`n4@B`XpsMuE`>0vX|?txWlE?N}QfFlSUrWwhhS=!D@k;AdS(v{4Ie z<3hq1i3EtIy_B5iN~Xua&8&$o<61Vena%7=L54S*RiR#lCn z=v74InC-o1UXl3wdei;!g?qORn|OD7$}`3wA|b%RJMgp~S0{ej+uGfubM^vwJMW0+ fhZ~>*D6rTA@7F;Qy3HiI00000NkvXXu0mjfY0PzX 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); -- 2.11.0