From: Eric McDonald <mcdonald@phy.cmich.edu>
To: Hans Ronne <hronne@comhem.se>
Cc: xconq7@sources.redhat.com
Subject: Re: Improved combat code
Date: Sun, 22 Aug 2004 04:21:00 -0000 [thread overview]
Message-ID: <41280E70.7010209@phy.cmich.edu> (raw)
In-Reply-To: <l03130300bd4d9d8171d1@[212.181.162.155]>
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.
next prev parent reply other threads:[~2004-08-22 3:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-22 2:46 Hans Ronne
2004-08-22 4:21 ` Eric McDonald [this message]
2004-08-22 5:54 ` Hans Ronne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41280E70.7010209@phy.cmich.edu \
--to=mcdonald@phy.cmich.edu \
--cc=hronne@comhem.se \
--cc=xconq7@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).