-rw-r--r-- | noncore/games/backgammon/moveengine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp index a4145cc..b102258 100644 --- a/noncore/games/backgammon/moveengine.cpp +++ b/noncore/games/backgammon/moveengine.cpp @@ -50,12 +50,13 @@ void MoveEngine::position(Pieces& pieces,bool non_qte) for(int a=0;a<28;a++) { for(int b=0;b<abs(population[a].total);b++) { if(population[a].total>0) //player 1 pieces { + if (a < 26) pieces.player1[player1_counter].x=x_coord[a]-offset; if(a>=0 && a<13) { pieces.player1[player1_counter].y=yup_coord[b]-offset; pieces.player1[player1_counter].z=z_coord[b]; pieces.player1[player1_counter].side=false; @@ -93,12 +94,13 @@ void MoveEngine::position(Pieces& pieces,bool non_qte) } } else if(population[a].total<0) //player 2 pieces { + if (a < 26) pieces.player2[player2_counter].x=x_coord[a]-offset; if(a>=0 && a<13) { pieces.player2[player2_counter].y=yup_coord[b]-offset; pieces.player2[player2_counter].z=z_coord[b]; pieces.player2[player2_counter].side=false; |