Index: Games/Pingus/src/actions/digger.cxx =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.cxx,v retrieving revision 1.16 diff -u -r1.16 digger.cxx --- Games/Pingus/src/actions/digger.cxx 1 Oct 2002 19:53:45 -0000 1.16 +++ Games/Pingus/src/actions/digger.cxx 13 Oct 2002 23:11:18 -0000 @@ -47,6 +47,11 @@ "pingus", PropertyMgr::instance()->get_int ("actions/digger/sprite-fps", 20)); #endif sprite.set_align_center_bottom (); + + digger_radius_width = digger_radius.get_width(); + digger_radius_height = digger_radius.get_height(); + digger_radius_gfx_width = digger_radius_gfx.get_width(); + digger_radius_gfx_height = digger_radius_gfx.get_height(); } void @@ -90,11 +95,11 @@ Digger::dig () { WorldObj::get_world()->get_colmap()->remove(digger_radius, - static_cast(pingu->get_x () - 16), - static_cast(pingu->get_y() - 14)); + static_cast(pingu->get_x() - (digger_radius_width / 2)), + static_cast(pingu->get_y() - digger_radius_height + 2)); WorldObj::get_world()->get_gfx_map()->remove(digger_radius_gfx, - static_cast(pingu->get_x () - 16), - static_cast(pingu->get_y() - 14)); + static_cast(pingu->get_x () - (digger_radius_gfx_width / 2)), + static_cast(pingu->get_y() - digger_radius_gfx_height + 2)); pingu->set_y(pingu->get_y() + 1); } Index: Games/Pingus/src/actions/digger.hxx =================================================================== RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v retrieving revision 1.11 diff -u -r1.11 digger.hxx --- Games/Pingus/src/actions/digger.hxx 4 Oct 2002 13:46:56 -0000 1.11 +++ Games/Pingus/src/actions/digger.hxx 13 Oct 2002 23:11:18 -0000 @@ -33,6 +33,18 @@ Sprite sprite; int digger_c; + /** Width of the digger_radius surface */ + unsigned int digger_radius_width; + + /** Height of the digger_radius surface */ + unsigned int digger_radius_height; + + /** Width of the digger_radius_gfx surface */ + unsigned int digger_radius_gfx_width; + + /** Height of the digger_radius_gfx surface */ + unsigned int digger_radius_gfx_height; + public: Digger(); void init (void);