- Timestamp:
- May 3, 2019, 11:23:15 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/3DPacman_FS19/src/modules/pacman/PacmanPink.cc
r12326 r12338 45 45 } 46 46 47 int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos());48 47 this->pointInFrontOfPlayer=frontPosition(); //getPointInFrontOfPacman(lastPlayerPassedPoint, directionV); 49 //std::cout<<this->pointInFrontOfPlayer<<endl;50 //std::cout<<this->lastPlayerPassedPoint<<endl;51 48 52 49 Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z); 53 //std::cout<<pinkPos<<endl;54 50 55 51 //Stop, if target arrived … … 91 87 lockmove = true; 92 88 93 //Vector3 pinkPos=Vector3(this->target_x, 10, this->target_z);94 //std::cout<<pinkPos<<endl;95 96 //int directionV = findPlayerTravDir (lastPlayerPassedPoint, this->getPlayerPos());97 89 //this->pointInFrontOfPlayer=getPointInFrontOfPacman(lastPlayerPassedPoint, directionV); 98 90 99 //std::cout<<this->lastPlayerPassedPoint<<endl;100 101 //std::cout<<this->pointInFrontOfPlayer<<endl;102 91 nextMove(pinkPos, pointInFrontOfPlayer, lastPlayerPassedPoint); 103 92 … … 119 108 Vector3 nextTarget; 120 109 121 std::cout<<this->actuelposition<<endl;110 /*std::cout<<this->actuelposition<<endl; 122 111 std::cout<<pinkPosP<<endl; 123 112 std::cout<<playerPos<<endl; 124 113 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; 126 117 127 118 if(playerPos==pointToAvoidP11){ //SIGSEV if playerPos==pointToAvoidP11 otherwise … … 131 122 nextTarget=getShortestPath(pinkPosP, playerPos); 132 123 }*/ 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 }*/ 133 134 else{ 134 135 //bugs here 135 std::cout<< "msjiowjqiq"<<endl;136 std::cout<<pinkPosP<<endl; 136 137 nextTarget = getShortestPath(pinkPosP, playerPos, pointToAvoidP11); 137 138 } 138 139 std::cout<<nextTarget<<endl; 139 140 setNewTargetGhost(nextTarget); 140 141 }
Note: See TracChangeset
for help on using the changeset viewer.