From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20456 invoked by alias); 22 Aug 2004 03:09:42 -0000 Mailing-List: contact xconq7-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: xconq7-owner@sources.redhat.com Received: (qmail 20447 invoked from network); 22 Aug 2004 03:09:41 -0000 Received: from unknown (HELO sccrmhc13.comcast.net) (204.127.202.64) by sourceware.org with SMTP; 22 Aug 2004 03:09:41 -0000 Received: from [192.168.181.128] (c-67-172-156-222.client.comcast.net[67.172.156.222]) by comcast.net (sccrmhc13) with ESMTP id <2004082203094001600jr9r3e>; Sun, 22 Aug 2004 03:09:40 +0000 Message-ID: <41280E70.7010209@phy.cmich.edu> Date: Sun, 22 Aug 2004 04:21:00 -0000 From: Eric McDonald User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) MIME-Version: 1.0 To: Hans Ronne CC: xconq7@sources.redhat.com Subject: Re: Improved combat code References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004/txt/msg00986.txt.bz2 Hans Ronne wrote: > 3. Unit images are now updated correctly when a unit is wrecked or changes > type. I hope that this was just a mistake on your part: =================================================================== RCS file: /cvs/xconq/xconq/ChangeLog,v retrieving revision 1.1473 retrieving revision 1.1474 diff -u -r1.1473 -r1.1474 --- xconq/ChangeLog 2004/08/22 00:12:25 1.1473 +++ xconq/ChangeLog 2004/08/22 00:37:40 1.1474 @@ -1,19 +1,15 @@ -2004-08-22 Eric McDonald +2004-08-21 Hans Ronne - Reduce buzzing when formations are in use. Also, improve previous - fix. - * run.c (side_move_some_units): Be more selective about what plans - get executed by making sure that there is either a pending action - or a task list. Only set the 'waitingfortask' flag on plans with - formations if their are actually tasks present. - - Fix display bug that appeared in 'change-type' sometime in the past - few months, probably as a result of hacking the image loading or - unit views. - * unit.c (change_unit_type): Upon changing type, set the unit's - image name to an empty string (to force loading of a new image), - and then call 'set_unit_image'. (A call to 'update_side_display' - used to do the right thing, but apparently not anymore.) + Add network functions for TASK_ATTACK and TASK_FIRE. + * tp.c (net_push_attack_task): New function. + (net_set_attack_task): New function. + (net_push_fire_task): New function. + (net_set_fire_task): New function. + + Fix so that images are updated for units that are + wrecked or change type. + * unit.c (change_unit_type): Set unit->image_name and + unit->imf to NULL and call set_unit_image. =================================================================== RCS file: /cvs/xconq/xconq/kernel/unit.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- xconq/kernel/unit.c 2004/08/22 00:12:26 1.94 +++ xconq/kernel/unit.c 2004/08/22 00:37:41 1.95 @@ -443,6 +443,10 @@ all_see_leave(unit, unit->x, unit->y, (transport == NULL)); /* Do the actual change. */ unit->type = newtype; + /* Reset unit image to new type. */ + unit->imf = NULL; + unit->image_name = NULL; + set_unit_image(unit); /* Make sure the new unit is complete. */ unit->cp = u_cp(newtype); /* Set the new hp to the same ratio of max as the unit had before. @@ -520,10 +524,6 @@ newtype, reason)) return; } - /* Set the unit image by first clearing the old image name. - 'set_unit_image' will set a new image name and image for us. */ - unit->image_name = ""; - set_unit_image(unit); /* Increment viewing coverage. */ cover_area(unit->side, unit, transport, -1, -1, unit->x, unit->y); /* If vision range is 0, allow glimpses of adjacent cell terrain.