Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2019, 11:23:15 AM (5 years ago)
Author:
peterf
Message:

Pink Bug Workaround

File:
1 edited

Legend:

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

    r12326 r12338  
    4545            }
    4646
    47         int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos());
    4847        this->pointInFrontOfPlayer=frontPosition(); //getPointInFrontOfPacman(lastPlayerPassedPoint, directionV);
    49         //std::cout<<this->pointInFrontOfPlayer<<endl;
    50         //std::cout<<this->lastPlayerPassedPoint<<endl;
    5148
    5249        Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
    53         //std::cout<<pinkPos<<endl;
    5450       
    5551        //Stop, if target arrived
     
    9187            lockmove = true;
    9288
    93             //Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);
    94             //std::cout<<pinkPos<<endl;
    95 
    96             //int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos());
    9789            //this->pointInFrontOfPlayer=getPointInFrontOfPacman(lastPlayerPassedPoint, directionV);
    9890           
    99             //std::cout<<this->lastPlayerPassedPoint<<endl;
    100 
    101             //std::cout<<this->pointInFrontOfPlayer<<endl;
    10291            nextMove(pinkPos, pointInFrontOfPlayer, lastPlayerPassedPoint);
    10392
     
    119108        Vector3 nextTarget;
    120109
    121         std::cout<<this->actuelposition<<endl;
     110        /*std::cout<<this->actuelposition<<endl;
    122111        std::cout<<pinkPosP<<endl;
    123112        std::cout<<playerPos<<endl;
    124113        std::cout<<pointToAvoidP11<<endl;
    125         std::cout<<this->getPlayerPos()<<endl;
     114        std::cout<<this->getPlayerPos()<<endl;*/
     115        std::cout<<playerPos<<endl;
     116        std::cout<<"kok"<<endl;
    126117
    127118        if(playerPos==pointToAvoidP11){ //SIGSEV if playerPos==pointToAvoidP11 otherwise
     
    131122            nextTarget=getShortestPath(pinkPosP, playerPos);
    132123        }*/
     124        else if((playerPos==Vector3(-70,10,-35))/*||(playerPos==Vector3(-20,10,-35))||(playerPos==Vector3(0,10,-35))*/){
     125            //nextTarget=pinkPosP;
     126        nextTarget=getShortestPath(pinkPosP, Vector3(-70,10,-35));
     127        std::cout<<"ChaillyVillage"<<endl;
     128        }
     129        /*else if((playerPos==Vector3(-70,10,-35))&&(pinkPosP==Vector3(-70,10,60))/*||(playerPos==Vector3(-20,10,-35))||(playerPos==Vector3(0,10,-35))){
     130            //nextTarget=pinkPosP;
     131        nextTarget=getShortestPath(pinkPosP, Vector3(-70,10,-35));
     132        std::cout<<"ChaillyVillage"<<endl;
     133        }*/
    133134        else{
    134135            //bugs here
    135             std::cout<<"msjiowjqiq"<<endl;
     136            std::cout<<pinkPosP<<endl;
    136137        nextTarget = getShortestPath(pinkPosP, playerPos, pointToAvoidP11);
    137138        }
    138    
     139        std::cout<<nextTarget<<endl;
    139140       setNewTargetGhost(nextTarget);
    140141    }
Note: See TracChangeset for help on using the changeset viewer.