From: Arun Persaud Date: Mon, 29 Oct 2007 19:29:42 +0000 (+0100) Subject: BUGFIX: when playing with both schweinchen X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34ca8d684f3515232508f4a581828f5f069c323f;p=e-DoKo.git BUGFIX: when playing with both schweinchen they second fox always became the highest trump, even if the two foxes where not on the same hand. Also: every fox led to a comment:"schweinchen". Both fixed now. --- diff --git a/index.php b/index.php index 538bc81..7d35814 100644 --- a/index.php +++ b/index.php @@ -1120,7 +1120,7 @@ else if(myisset("me")) date_default_timezone_set($zone); /* check if first schweinchen has been played */ - if($r[0] == 19 || $r[0] == 20 ) + if( $GAME["schweinchen"] && ($r[0] == 19 || $r[0] == 20) ) $GAME["schweinchen"]++; /* save card to be able to find the winner of the trick later */ @@ -1230,9 +1230,9 @@ else if(myisset("me")) $playid = DB_play_card($trickid,$handcardid,$sequence); /* check for schweinchen */ - if($card == 19 || $card == 20 ) + if($GAME["schweinchen"] && ($card == 19 || $card == 20) ) { - $GAME["schweinchen"]++; + $GAME["schweinchen"]++; // count how many have been played including this one if($GAME["schweinchen"]==3 && $RULES["schweinchen"]=="second" ) DB_insert_comment("Schweinchen! ",$playid,$myid); if($RULES["schweinchen"]=="both" )