From: Ondřej Hošek Date: Fri, 6 Jan 2006 19:53:22 +0000 (+0000) Subject: * In the usage help, put LEVELFILE into brackets since it's an optional argument. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=311e23e2671e47d5cbbb06a869282be3238573de;p=supertux.git * In the usage help, put LEVELFILE into brackets since it's an optional argument. * 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 --- diff --git a/src/main.cpp b/src/main.cpp index ae2dad177..1b5653b94 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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" diff --git a/src/object/player.cpp b/src/object/player.cpp index e1f96b0fb..043a770f0 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -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 (&other); + if(bullet) { + return FORCE_MOVE; + } + Portable* portable = dynamic_cast (&other); if(portable && grabbed_object == 0 && controller->hold(Controller::ACTION) && fabsf(hit.normal.x) > .9) { diff --git a/src/title.cpp b/src/title.cpp index 66ffb3c27..94ccc5a0a 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -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" ),