Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12970/src
Modified Files:
badguy.cpp
Log Message:
This should fix the position of ice blocks when hold.
Index: badguy.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- badguy.cpp 9 Sep 2004 18:42:18 -0000 1.118
+++ badguy.cpp 9 Sep 2004 18:57:05 -0000 1.119
@@ -339,16 +339,23 @@
{ /* FIXME: The pbad object shouldn't know about pplayer objects. */
/* If we're holding the iceblock */
dir = tux.dir;
- if(dir==RIGHT)
+ if(tux.size == SMALL)
{
- base.x = tux.base.x + 16;
- base.y = tux.base.y + tux.base.height/1.5 - base.height;
+ if(dir == RIGHT)
+ base.x = tux.base.x + 24;
+ else // dir == LEFT
+ base.x = tux.base.x - 12;
+ base.y = tux.base.y + tux.base.height/1.5 - base.height;
}
- else /* facing left */
+ else // TUX == BIG
{
- base.x = tux.base.x - 16;
- base.y = tux.base.y + tux.base.height/1.5 - base.height;
+ if(dir == RIGHT)
+ base.x = tux.base.x + 24;
+ else // dir == LEFT
+ base.x = tux.base.x - 4;
+ base.y = tux.base.y + tux.base.height/1.5 - base.height;
}
+
if(collision_object_map(base))
{
base.x = tux.base.x;
@@ -1325,7 +1332,8 @@
// Put bad guys a part (or they get jammed)
// only needed to do to one of them
- base.x = pbad_c->base.x + pbad_c->base.width + 1;
+ if (physic.get_velocity_x() != 0)
+ base.x = pbad_c->base.x + pbad_c->base.width + 1;
}
else if (dir == RIGHT)
{
|