fix rounds counter in cup mode
This commit is contained in:
		@@ -1378,6 +1378,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
									$this->currentscore = array_merge($this->currentscore, array(array($rank, $player->login, $points , $result->getMapPoints(), $time, "")));
 | 
														$this->currentscore = array_merge($this->currentscore, array(array($rank, $player->login, $points , $result->getMapPoints(), $time, "")));
 | 
				
			||||||
								} elseif ($this->currentgmbase == "Cup") {
 | 
													} elseif ($this->currentgmbase == "Cup") {
 | 
				
			||||||
									$this->currentscore = array_merge($this->currentscore, array(array($rank, $player->login, ($points + $roundpoints), $roundpoints, $time, "-1")));
 | 
														$this->currentscore = array_merge($this->currentscore, array(array($rank, $player->login, ($points + $roundpoints), $roundpoints, $time, "-1")));
 | 
				
			||||||
 | 
														if ($roundpoints > 0) $atleastonefinished = true; // Round is skipped if no one finishes only in cup mode
 | 
				
			||||||
								} elseif ($this->currentgmbase == "Rounds" ) {
 | 
													} elseif ($this->currentgmbase == "Rounds" ) {
 | 
				
			||||||
									$this->currentscore = array_merge($this->currentscore, array(array($rank, $player->login, ($points + $roundpoints), $roundpoints, $time, "-1")));
 | 
														$this->currentscore = array_merge($this->currentscore, array(array($rank, $player->login, ($points + $roundpoints), $roundpoints, $time, "-1")));
 | 
				
			||||||
								} elseif ($this->currentgmbase == "Teams") {
 | 
													} elseif ($this->currentgmbase == "Teams") {
 | 
				
			||||||
@@ -1403,8 +1404,10 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
						}
 | 
											}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						if (!$this->pauseon && !$this->skipround) {
 | 
											if (!$this->pauseon && !$this->skipround) {
 | 
				
			||||||
 | 
												if ($this->currentgmbase != "Cup" || ($this->currentgmbase == "Cup" && isset($atleastonefinished) && $atleastonefinished)) { // Round is skipped if no one finishes only in cup mode
 | 
				
			||||||
								$this->nbrounds++;
 | 
													$this->nbrounds++;
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
						if ($this->skipround) {
 | 
											if ($this->skipround) {
 | 
				
			||||||
							$this->skipround = false;
 | 
												$this->skipround = false;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user