Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: (PR#4536) pcity->ai.urgency not updated after reload
Home

[Freeciv-Dev] Re: (PR#4536) pcity->ai.urgency not updated after reload

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4536) pcity->ai.urgency not updated after reload
From: "Jason Short" <jshort@xxxxxxxxxxxxxx>
Date: Fri, 11 Jul 2003 07:54:00 -0700
Reply-to: rt@xxxxxxxxxxxxxx

--On Friday, July 11, 2003 07:46:18 -0700 "Per I. Mathisen" 
<per@xxxxxxxxxxx> wrote:

>
> On Fri, 11 Jul 2003, Jason Short wrote:
>> Valgrind shows that pcity->ai.urgency is never updated after a saved
>> game is loaded.
>>
>> Most likely this is a bug; the urgency should be recalculated when it is
>> needed.Possibly the urgency should be saved.  This patch simply
>> initializes it to 0.
>
> Please add it to the savegame instead. Just a handful of extra lines of
> code.

Patch attached.

But doesn't this start us down some sort of slippery slope where all AI 
data is saved rather than recalculated from scratch when the saved game is 
loaded?  Alghouth, I suppose some data simply cannot be recalculated 
without being stored.

jason

Attachment: ai_urgency-2.diff
Description: ai_urgency-2.diff


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