From: mathnerd314 Date: Wed, 20 Jan 2010 23:24:05 +0000 (+0000) Subject: Bugs 454 (ice attribute) + 553 (Knee-deep in the Depth secret area) fixes X-Git-Url: https://git.octo.it/?p=supertux.git;a=commitdiff_plain;h=aed83bde7123cb8f4a167b1af1aa60cb0c031b3f Bugs 454 (ice attribute) + 553 (Knee-deep in the Depth secret area) fixes git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6265 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- diff --git a/data/levels/world2/christophB.stl b/data/levels/world2/christophB.stl index 557702d4c..565525d3e 100644 --- a/data/levels/world2/christophB.stl +++ b/data/levels/world2/christophB.stl @@ -116,9 +116,9 @@ wait(0.5); Tux.do_cheer(); end_level(); ") + (sprite "images/objects/keys/key_fire.sprite") (x 3584) (y 736) - (sprite "images/objects/keys/key_fire.sprite") ) (pushbutton (script "LavaRising.goto_node(3); @@ -161,8 +161,8 @@ plat2.goto_node(3);") (y 704) ) (tilemap - (z-pos -101) (solid #f) + (z-pos -101) (name "BGTiles") (width 160) (height 128) @@ -298,8 +298,8 @@ plat2.goto_node(3);") ) ) (tilemap - (z-pos -100) (solid #f) + (z-pos -100) (name "BGArt") (width 160) (height 128) @@ -435,8 +435,8 @@ plat2.goto_node(3);") ) ) (tilemap - (z-pos 0) (solid #t) + (z-pos 0) (name "Interactive") (width 160) (height 128) @@ -452,7 +452,7 @@ plat2.goto_node(3);") 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1404 1372 1373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1404 1372 1373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1404 1372 1373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1404 1372 1373 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @@ -572,8 +572,8 @@ plat2.goto_node(3);") ) ) (tilemap - (z-pos 101) (solid #t) + (z-pos 101) (name "LavaRising") (path (node @@ -730,8 +730,8 @@ plat2.goto_node(3);") ) ) (tilemap - (z-pos 102) (solid #f) + (z-pos 102) (name "LavaBorder") (width 160) (height 128) @@ -867,8 +867,8 @@ plat2.goto_node(3);") ) ) (tilemap - (z-pos 1) (solid #f) + (z-pos 1) (name "FGArt") (width 160) (height 128) diff --git a/src/supertux/sector.cpp b/src/supertux/sector.cpp index 76ebf067b..d337fc8e7 100644 --- a/src/supertux/sector.cpp +++ b/src/supertux/sector.cpp @@ -1008,7 +1008,7 @@ Sector::collision_tile_attributes(const Rectf& dest) const float x1 = dest.p1.x; float y1 = dest.p1.y; float x2 = dest.p2.x; - float y2 = dest.p2.y + SHIFT_DELTA; + float y2 = dest.p2.y; uint32_t result = 0; for(std::list::const_iterator i = solid_tilemaps.begin(); i != solid_tilemaps.end(); i++) { @@ -1019,14 +1019,22 @@ Sector::collision_tile_attributes(const Rectf& dest) const int starttiley = int(y1 - solids->get_y_offset()) / 32; int max_x = int(x2 - solids->get_x_offset()); int max_y = int(y2+1 - solids->get_y_offset()); + int max_y_ice = int(max_y + SHIFT_DELTA); for(int x = starttilex; x*32 < max_x; ++x) { - for(int y = starttiley; y*32 < max_y; ++y) { + int y; + for(y = starttiley; y*32 < max_y; ++y) { const Tile* tile = solids->get_tile(x, y); if(!tile) continue; result |= tile->getAttributes(); } + for(; y*32 < max_y_ice; ++y) { + const Tile* tile = solids->get_tile(x, y); + if(!tile) + continue; + result |= (tile->getAttributes() & Tile::ICE); + } } } @@ -1272,7 +1280,7 @@ Sector::handle_collisions() continue; uint32_t tile_attributes = collision_tile_attributes(moving_object->dest); - if(tile_attributes > Tile::FIRST_INTERESTING_FLAG) { + if(tile_attributes >= Tile::FIRST_INTERESTING_FLAG) { moving_object->collision_tile(tile_attributes); } }