[Super-tux-commit] supertux/src badguy.cpp,1.78,1.79 gameobjs.cpp,1.24,1.25 level.cpp,1.76,1.77 play
Brought to you by:
wkendrick
From: Ryan F. <sik...@us...> - 2004-05-17 17:01:46
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7551 Modified Files: badguy.cpp gameobjs.cpp level.cpp player.cpp Log Message: - some trampoline changes - fixed bug mentioned by Marek in the mailing list (I think) Index: player.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- player.cpp 17 May 2004 06:26:41 -0000 1.98 +++ player.cpp 17 May 2004 17:01:21 -0000 1.99 @@ -709,7 +709,7 @@ ptramp_c = (Trampoline*) p_c_object; // Pick up trampoline - if (ptramp_c->mode != Trampoline::M_HELD && input.fire == DOWN && !holding_something) + if (ptramp_c->mode != Trampoline::M_HELD && input.fire == DOWN && !holding_something && on_ground()) { holding_something = true; ptramp_c->mode = Trampoline::M_HELD; @@ -796,7 +796,7 @@ bool Player::is_dead() { - if(base.y > screen->h || base.x < scroll_x - AUTOSCROLL_DEAD_INTERVAL) // last condition can happen in auto-scrolling + if(base.y > World::current()->get_level()->height * /*TILE_HEIGHT*/ 32 || base.x < scroll_x - AUTOSCROLL_DEAD_INTERVAL) // last condition can happen in auto-scrolling return true; else return false; @@ -822,7 +822,7 @@ } /* Keep in-bounds, vertically: */ - if (base.y > screen->h) + if (base.y > sWorld::current()->get_level()->height * /*TILE_HEIGHT*/ 32) { kill(KILL); } Index: gameobjs.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameobjs.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- gameobjs.cpp 17 May 2004 06:26:41 -0000 1.24 +++ gameobjs.cpp 17 May 2004 17:01:21 -0000 1.25 @@ -220,9 +220,10 @@ void load_object_gfx() { + char sprite_name[16]; + for (int i = 0; i < TRAMPOLINE_FRAMES; i++) { - char sprite_name[16]; sprintf(sprite_name, "trampoline-%i", i+1); img_trampoline[i] = sprite_manager->load(sprite_name); } @@ -257,8 +258,6 @@ { // TODO: Remove if we're too far off the screen - physic.apply(frame_ratio, base.x, base.y); - // Falling if (mode != M_HELD) { @@ -300,6 +299,9 @@ base.y = tux.base.y + tux.base.height/1.5 - base.height; } } + + physic.apply(frame_ratio, base.x, base.y); + collision_swept_object_map(&old_base, &base); } void @@ -329,7 +331,7 @@ else frame = 0; - if (squish_amount < 24) + if (squish_amount < 20) pplayer_c->physic.set_velocity_y(power); else if (pplayer_c->physic.get_velocity_y() < 0) pplayer_c->physic.set_velocity_y(-squish_amount/32); Index: level.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/level.cpp,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- level.cpp 17 May 2004 01:24:24 -0000 1.76 +++ level.cpp 17 May 2004 17:01:21 -0000 1.77 @@ -233,7 +233,7 @@ song_title = "Mortimers_chipdisko.mod"; bkgd_image = "arctis.png"; width = 21; - height = 15; + height = 19; start_pos_x = 100; start_pos_y = 170; time_left = 100; Index: badguy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- badguy.cpp 17 May 2004 09:11:58 -0000 1.78 +++ badguy.cpp 17 May 2004 17:01:21 -0000 1.79 @@ -714,7 +714,7 @@ } // BadGuy fall below the ground - if (base.y > screen->h) { + if (base.y > World::current()->get_level()->height * 32) { remove_me(); return; } |