* In the usage help, put LEVELFILE into brackets since it's an optional argument.
authorOndřej Hošek <ondra.hosek@gmail.com>
Fri, 6 Jan 2006 19:53:22 +0000 (19:53 +0000)
committerOndřej Hošek <ondra.hosek@gmail.com>
Fri, 6 Jan 2006 19:53:22 +0000 (19:53 +0000)
* When Tux is temporarily invincible after being hurt, MovingObjects don't affect him anymore.
* Renewed the copyright on the title screen to match this year.
* Tux isn't pushed forward by his own bullets anymore.

SVN-Revision: 2975

src/main.cpp
src/object/player.cpp
src/title.cpp

index ae2dad1..1b5653b 100644 (file)
@@ -180,7 +180,7 @@ static void init_physfs(const char* argv0)
 
 static void print_usage(const char* argv0)
 {
-  fprintf(stderr, _("Usage: %s [OPTIONS] LEVELFILE\n\n"), argv0);
+  fprintf(stderr, _("Usage: %s [OPTIONS] [LEVELFILE]\n\n"), argv0);
   fprintf(stderr,
           _("Options:\n"
             "  -f, --fullscreen             Run in fullscreen mode\n"
index e1f96b0..043a770 100644 (file)
@@ -38,6 +38,7 @@
 #include "object/camera.hpp"
 #include "object/gameobjs.hpp"
 #include "object/portable.hpp"
+#include "object/bullet.hpp"
 #include "trigger/trigger_base.hpp"
 #include "control/joystickkeyboardcontroller.hpp"
 #include "main.hpp"
@@ -153,6 +154,14 @@ Player::update(float elapsed_time)
     return;
   }
 
+  // fixes the "affected even while blinking" bug
+  if (safe_timer.started() && this->get_group() != COLGROUP_MOVING_ONLY_STATIC) {
+    this->set_group(COLGROUP_MOVING_ONLY_STATIC);
+  }
+  else if (!safe_timer.started() && this->get_group() == COLGROUP_MOVING_ONLY_STATIC) {
+    this->set_group(COLGROUP_MOVING);
+  }
+
   if(!controller->hold(Controller::ACTION) && grabbed_object) {
     // move the grabbed object a bit away from tux
     Vector pos = get_pos() + 
@@ -668,6 +677,11 @@ Player::collision_tile(uint32_t tile_attributes)
 HitResponse
 Player::collision(GameObject& other, const CollisionHit& hit)
 {
+  Bullet* bullet = dynamic_cast<Bullet*> (&other);
+  if(bullet) {
+    return FORCE_MOVE;
+  }
+
   Portable* portable = dynamic_cast<Portable*> (&other);
   if(portable && grabbed_object == 0 && controller->hold(Controller::ACTION)
      && fabsf(hit.normal.x) > .9) {
index 66ffb3c..94ccc5a 100644 (file)
@@ -343,7 +343,7 @@ void title()
               Vector(0, SCREEN_HEIGHT - 50), LEFT_ALLIGN, LAYER_FOREGROUND1);
       context.draw_text(white_small_text,
         _(
-"Copyright (c) 2005 SuperTux Devel Team\n"
+"Copyright (c) 2006 SuperTux Devel Team\n"
 "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to\n"
 "redistribute it under certain conditions; see the file COPYING for details.\n"
         ),