Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4044) Revised multiple veteran patch
Home

[Freeciv-Dev] Re: (PR#4044) Revised multiple veteran patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: james.blewitt@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4044) Revised multiple veteran patch
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Sun, 8 Jun 2003 16:42:34 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Hi All

Sorry that I look on this code so late but I simple forgot about this :(
I don't try this code only look on it and this code is nice but I found 
some things ...

1) uses of strlen's

> 
> You do a lot of this:
>    if (strlen(game.rgame.veteran_name[punit->veteran]) == 0) {
> 
> But why? I see no reason to do that. You also don't include <string.h>
> in files where you add these calls to strlen.
> 
I agree

2) MAX_VET_LEVELS is hardcoded via #define in shared.h
It should be configurable via ruleset's files

3) NONE spy can't escape.

     struct city *spyhome = find_city_by_id (pdiplomat->homecity);
     if (!spyhome) {
       send_unit_info (pplayer, pdiplomat);
       freelog(LOG_ERROR, "Bug in diplomat_escape: Unhomed Spy.");
       return;
     }

in this case "spyhome" should be capital or (if Palace is destroyed) 
first city on list or nerrest friendly city.

Rafal




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