git repos / blockattack-game

commit 0be2dfb3

sago007 · 2016-10-30 12:07
0be2dfb35b69440b062b6705f76cee1e1a06fff6 patch · browse files
parent 61f519734a1f1ab473072efa5061158e5a8bd383

Fixed a problem where the loosing player would appear as the Winner in VS if he had the highest score

Changed files

M source/code/main.cpp before
diff --git a/source/code/main.cpp b/source/code/main.cpp index 4f3fb1e..7174326 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp
@@ -2007,7 +2007,7 @@ int runGame(Gametype gametype, int level) {
if (!networkPlay)
#endif
if (twoPlayers) {
- if ((theGame.isGameOver()) && (theGame2.isGameOver())) {
+ if (theGame.isGameOver() && theGame2.isGameOver() && !theGame.GetIsWinner() && !theGame2.GetIsWinner() ) {
if (theGame.GetScore()+theGame.GetHandicap()>theGame2.GetScore()+theGame2.GetHandicap()) {
BlockGameAction a;
a.action = BlockGameAction::Action::SET_WON;