Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2019, 1:00:11 PM (5 years ago)
Author:
peterf
Message:

bug fix

File:
1 edited

Legend:

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

    r12325 r12326  
    3636
    3737        this->actuelposition = this->getPosition();
     38        //std::cout<<this->actuelposition<<endl;
    3839
    3940
     
    4647        int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos());
    4748        this->pointInFrontOfPlayer=frontPosition(); //getPointInFrontOfPacman(lastPlayerPassedPoint, directionV);
    48         std::cout<<this->pointInFrontOfPlayer<<endl;
    49         std::cout<<this->lastPlayerPassedPoint<<endl;
     49        //std::cout<<this->pointInFrontOfPlayer<<endl;
     50        //std::cout<<this->lastPlayerPassedPoint<<endl;
     51
     52        Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
     53        //std::cout<<pinkPos<<endl;
    5054       
    5155        //Stop, if target arrived
     
    8791            lockmove = true;
    8892
    89             Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
     93            //Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
     94            //std::cout<<pinkPos<<endl;
    9095
    9196            //int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos());
     
    114119        Vector3 nextTarget;
    115120
     121        std::cout<<this->actuelposition<<endl;
     122        std::cout<<pinkPosP<<endl;
     123        std::cout<<playerPos<<endl;
     124        std::cout<<pointToAvoidP11<<endl;
     125        std::cout<<this->getPlayerPos()<<endl;
     126
    116127        if(playerPos==pointToAvoidP11){ //SIGSEV if playerPos==pointToAvoidP11 otherwise
    117128            nextTarget = getShortestPath(pinkPosP, playerPos);
    118129        }
     130        /*else if(pinkPosP==pointToAvoidP11){
     131            nextTarget=getShortestPath(pinkPosP, playerPos);
     132        }*/
    119133        else{
     134            //bugs here
     135            std::cout<<"msjiowjqiq"<<endl;
    120136        nextTarget = getShortestPath(pinkPosP, playerPos, pointToAvoidP11);
    121137        }
Note: See TracChangeset for help on using the changeset viewer.