Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: (PR#4351) Client crashes when diplomat/spy investigate
Home

[Freeciv-Dev] Re: (PR#4351) Client crashes when diplomat/spy investigate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: cameron@xxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4351) Client crashes when diplomat/spy investigates city
From: "Jason Short" <jshort@xxxxxxxxxxxxxx>
Date: Sun, 13 Jul 2003 13:30:51 -0700
Reply-to: rt@xxxxxxxxxxxxxx

--On Sunday, July 13, 2003 13:10:06 -0700 "Per I. Mathisen" 
<per@xxxxxxxxxxx> wrote:

>
> On Fri, 11 Jul 2003, Jason Short wrote:
>> unpackage_unit is grossly incomplete! Some fields in the packet are
>> simply ignored.
>>
>> These were broken by this commit:
>>
>> revision 1.305
>> date: 2003/05/05 12:41:39;author: per;  state: Exp;  lines: +6 -16
>> Move virtual unit creation function from ai/aitools.c to common/game.c,
>> and use it in both client and server for creation unit skeletons. This
>> avoids duplication of code and allows client AI to use it to create
>> virtual units.
>
> The new function just isn't used everywhere it should be. Here is another
> patch. Untested. Can be combined with above-mentioned patch for failsafe.

Nice.  But rather than have this happen in two separate steps I think 
unpackage_unit should do it all (i.e., including the call to 
create_unit_virtual).  This avoids any confusion about who is initializing 
what field.

jason

Attachment: unpackage_unit-2.diff
Description: unpackage_unit-2.diff


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