From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9038 invoked by alias); 18 Jun 2006 16:01:09 -0000 Received: (qmail 9028 invoked by uid 22791); 18 Jun 2006 16:01:09 -0000 X-Spam-Check-By: sourceware.org Received: from mra03.ch.as12513.net (HELO mra03.ch.as12513.net) (82.153.254.71) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 18 Jun 2006 16:01:07 +0000 Received: from localhost (localhost [127.0.0.1]) by mra03.ch.as12513.net (Postfix) with ESMTP id 11427D46CA for ; Sun, 18 Jun 2006 17:01:03 +0100 (BST) Received: from mra03.ch.as12513.net ([127.0.0.1]) by localhost (mra03.ch.as12513.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04916-01-24 for ; Sun, 18 Jun 2006 17:01:02 +0100 (BST) Received: from vindaloo (unknown [81.168.30.161]) by mra03.ch.as12513.net (Postfix) with SMTP id D2368D45D1 for ; Sun, 18 Jun 2006 17:01:01 +0100 (BST) Message-ID: <006201c692f0$5e0c2b60$0e01a8c0@hurstfrost.net> From: "Ed Hurst-Frost" To: Subject: border_slide compensation problem Date: Sun, 18 Jun 2006 16:01:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-IsSubscribed: yes Mailing-List: contact xconq7-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: xconq7-owner@sourceware.org X-SW-Source: 2006/txt/msg00003.txt.bz2 Hello. Although I've known xconq for a very long time, I've only recently started developing with it. This is my first posting to this list. I'm hoping to start (yet another) xconq revival, but I'm not going to go into too much detail right now, because I've got a long way to go and anyway I'm not sure anyone's listening. But to find out whether there is, I'll start by asking about a possible bug that's been hampering me: It's in move.c rev 1.55, line 401: if ((dist == 2 && !border_slide_possible(u, ox, oy, x, y)) && dist > u_move_range(u2)) return A_ANY_TOO_FAR; If I understand correctly, this allows a border_slide to move a unit a distance of 2 even if its move_range is only 1. But I have units whose move_range is greater than 1, and this line stops them moving. Wouldn't it be better written: if (dist > u_move_range(u2) + (border_slide_possible(u, ox, oy, x, y)?1:0)) return A_ANY_TOO_FAR; This helps units with a move_range over 1, however it probably doesn't compensate for multiple slides between ox,oy and x,y. But I don't feel I understand border_slides enough yet to fix it completely. Can anyone help?