Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: [Freeciv] rfc: autoattack
Home

[Freeciv-Dev] Re: [Freeciv] rfc: autoattack

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Freeciv] rfc: autoattack
From: Thomas Strub <ue80@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Nov 2002 20:50:02 +0100

On Sun, Nov 17, 2002 at 11:04:11PM +0000, Per I. Mathisen wrote:
> On Sun, 17 Nov 2002, Thomas Strub wrote:
> > I use the key "k" for the autoattac"k".
> > Think only a sprite for the "k" is missing.
> 
> Wow, that was fast.
> 
> Some short comments so far (haven't tested it yet):
>  - Please remove the old autoattack code.

I didn't remove the old autoattack code + inserted some unused code from
my first construction (move more than 1 tile)

>  - Reuse the "A" key and sprite which the old autoattack code used. (This
> conflicts with A for autosettlers, but that doesn't matter, since by the
> time we have a modpack with military settlers, I bet Raimar has already
> moved autosettlers to the client anyway.)

done

>  - ACTIVITY_SERVER_AUTO_ATTACK -> ACTIVITY_AUTO_ATTACK

done

>  - Why are you checking in a 3 square radius? My suggestion was adjacent
> units only. Doing it over a larger distance has many pitfalls and may not
> be better (harder to know what it does, harder to trust).

I reused the sentry-code. But perhaps all units which can reach the tile
should be looked at. (No problem because the distance of different
autoattack units will decrease when multiple units will be involved)

Now its 1 field.

>  - If you only don't do 3 square radius, then don't use do_unit_goto(),
> use handle_unit_move_request() instead, as goto is overkill when you only
> are to move one square. This should simply a lot of the other code too.

done

Thomas
-- 
Thomas Strub  ***  eMail ue80@xxxxxxxxxxxxxxxxxxx
Nur weil das Aufzeichnen, Kopieren und Schnüffeln bei elektronischem 
Datenverkehr leichter als bei der klassischen Post ist, darf man es nicht
einfach tun.

Attachment: server_autoattack3.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]