control variables not being checked

Having an issue whit a loop not checking its control. In debugging it sees the number but seems to not check it.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   void mission1Story::fight()
   {
	   
	 do
	 {
	   //warrior.player();
	 pl.playerTurn();
	 pl.EnemyTurn();
	 //cout << "Player initiative is " << pl.playerInitiative << endl;
	//cout << "Enemy initiative is " << pl.enemyInitiative << endl;
	  
	 
		if (pl.playerInitiative >= pl.enemyInitiative)
		{
			
		 playerAttack();
		enemyAttack();
		//engagment();
		}
		else
		{
		   
			//warrior.player();
			enemyAttack();
			playerAttack();
			//engagment();
		}
	     	 }

	 while ( warrior.center_torso >= 0 || warrior.head >= 0 || target.center_torso >= 0 || target.head >= 0);
Topic archived. No new replies allowed.