Index: ./Games/Pingus/src/actions/climber.cxx =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cxx,v retrieving revision 1.18 diff -u -r1.18 climber.cxx --- ./Games/Pingus/src/actions/climber.cxx 13 Oct 2002 20:25:00 -0000 1.18 +++ ./Games/Pingus/src/actions/climber.cxx 26 Oct 2002 00:39:13 -0000 @@ -28,21 +28,8 @@ : PinguAction(p), sprite(Sprite ("Pingus/climber0", "pingus")) { - // these alignments are necessary to prevent climber walking - // inside the wall. - int sprite_height = sprite.get_height(); - int sprite_width = sprite.get_width(); - - if (pingu->direction.is_left()) - { - sprite.set_align(0, -sprite_height/2); - sprite.set_direction(Sprite::LEFT); - } - else - { - sprite.set_align(-sprite_width, -sprite_height/2); - sprite.set_direction(Sprite::RIGHT); - } + sprite_height = sprite.get_height(); + sprite_width = sprite.get_width(); } void @@ -57,6 +44,18 @@ */ sprite.update(); + + // This is necessary to prevent climber walking inside a wall. + if (pingu->direction.is_left()) + { + sprite.set_align(0, -sprite_height/2); + sprite.set_direction(Sprite::LEFT); + } + else + { + sprite.set_align(-sprite_width, -sprite_height/2); + sprite.set_direction(Sprite::RIGHT); + } // If above is free if (rel_getpixel(0, 1) == Groundtype::GP_NOTHING Index: ./Games/Pingus/src/actions/climber.hxx =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hxx,v retrieving revision 1.12 diff -u -r1.12 climber.hxx --- ./Games/Pingus/src/actions/climber.hxx 13 Oct 2002 16:40:01 -0000 1.12 +++ ./Games/Pingus/src/actions/climber.hxx 26 Oct 2002 00:39:13 -0000 @@ -29,6 +29,9 @@ { private: Sprite sprite; + int sprite_width; + int sprite_height; + public: Climber (Pingu*);