Fix display of promotion piece in ICS superchess
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 12 Mar 2011 13:08:50 +0000 (14:08 +0100)
committerArun Persaud <apersaud@lbl.gov>
Sun, 13 Mar 2011 19:51:10 +0000 (12:51 -0700)
In Great Shatranj and Superchess promoted Pawns were displayed as shadow
piece because these variants had holdings, while captured pieces should
go back into the holdings unchanged, rather than reverted to Pawns.

backend.c

index c724c0f..54a7e70 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -4368,7 +4368,8 @@ ParseBoard12(string)
            safeStrCpy(moveList[moveNum - 1], currentMoveString, sizeof(moveList[moveNum - 1])/sizeof(moveList[moveNum - 1][0]));
            strcat(moveList[moveNum - 1], "\n");
 
-            if(gameInfo.holdingsWidth && !appData.disguise) // inherit info that ICS does not give from previous board
+            if(gameInfo.holdingsWidth && !appData.disguise && gameInfo.variant != VariantSuper
+                                 && gameInfo.variant != VariantGreat) // inherit info that ICS does not give from previous board
               for(k=0; k<ranks; k++) for(j=BOARD_LEFT; j<BOARD_RGHT; j++) {
                 ChessSquare old, new = boards[moveNum][k][j];
                   if(fromY == DROP_RANK && k==toY && j==toX) continue; // dropped pieces always stand for themselves