X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=fc6ba3a24b53a611f10fc96e67762a5d3da690bb;hb=8227cf843e0eb19916b9e3a7460fa970a5e6958c;hp=0d11eae49289d04ec2d8cd148f3f9db27cd3d212;hpb=e9468d50717061047e1dbc5817d0f69b12c291c8;p=xboard.git diff --git a/xboard.c b/xboard.c index 0d11eae..fc6ba3a 100644 --- a/xboard.c +++ b/xboard.c @@ -8947,7 +8947,7 @@ AnimateMove(board, fromX, fromY, toX, toY) #if DONT_HOP hop = FALSE; #else - hop = (piece == WhiteKnight || piece == BlackKnight); + hop = abs(fromX-toX) == 1 && abs(fromY-toY) == 2 || abs(fromX-toX) == 2 && abs(fromY-toY) == 1; #endif if (appData.debugMode) { @@ -8959,12 +8959,12 @@ AnimateMove(board, fromX, fromY, toX, toY) ScreenSquare(toX, toY, &finish, &endColor); if (hop) { - /* Knight: make diagonal movement then straight */ + /* Knight: make straight movement then diagonal */ if (abs(toY - fromY) < abs(toX - fromX)) { mid.x = start.x + (finish.x - start.x) / 2; - mid.y = finish.y; + mid.y = start.y; } else { - mid.x = finish.x; + mid.x = start.x; mid.y = start.y + (finish.y - start.y) / 2; } } else {