Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 24, 2019, 10:38:07 PM (5 years ago)
Author:
peterf
Message:

continued brown and cyan pacman. Pink pacman still causes SIGSEV

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.cc

    r12319 r12322  
    1616        this->target_x=0;
    1717        this->target_z=15;
    18         this->lastPlayerPassedPoint=Vector3(70,10,-135);
     18        this->lastPlayerPassedPoint=Vector3(0,0,0); //Vector3(70,10,-135);
    1919         
    2020    }
     
    6060            }
    6161        }
     62        else if(this->lastPlayerPassedPoint==Vector3(0,0,0)){
     63            //as long as the player has not started the game,
     64            //i.e. lastPlayerPastPoint is (0,0,0), pink pacman
     65            //cannot possibly move, because it needs the position
     66            //of the player to move accordingly
     67
     68            this->ismoving=false;
     69        }
    6270        //Check on which position the ghost has arrived and set new target
    6371         else{
     
    6775            Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
    6876           
     77            std::cout<<this->lastPlayerPassedPoint<<endl;
     78
    6979            int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos());
    7080            this->pointInFrontOfPlayer=getPointInFrontOfPacman(lastPlayerPassedPoint, directionV);
    7181
    72 
     82            std::cout<<this->pointInFrontOfPlayer<<endl;
    7383            nextMove(pinkPos, pointInFrontOfPlayer, lastPlayerPassedPoint);
    7484
Note: See TracChangeset for help on using the changeset viewer.