Public bug reported:

Binary package hint: pacman

Turning into a wall should not stall pacman (he's very hard to actually
stop short of running head-on into one).

The simplest fix is that if he can't go in a new direction, he should
try continuing in the old one so in pacman.cc:

int Pacman::go(direction dd,Gamedata *da) {//what direction to try to move it
typ w;                                  //what's at new coordinates
int i=1;        //this i is returned: it is whether pacman moved or not.
int xx,yy;      //possible next coordinates
direction old_d = d;    // Save old direction (NEW_LINE)
if (dd!=none) try_d=d=dd;//if a direction!=none given, set the two directions
      ....
w=b->what_is(xx,yy);    //what's at new coordinates

switch (w) {            //if it's
 case classSpecialWall: case classWall: //can't move through walls
  {if  (old_d != dd) return go (old_d, da);     //      If we can't change 
direction, try to keep going (NEW_LINE)
   i=0; d=still; } break;
    ....
return i;       //this i is returned: it is whether pacman moved or not.
}

** Affects: pacman (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Controls incorrect - Pacman stalling when turning into a wall
https://bugs.launchpad.net/bugs/501531
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to