This is the mail archive of the
xconq7@sourceware.cygnus.com
mailing list for the Xconq project.
Examine other player units at end of game
- To: xconq7 at sourceware dot cygnus dot com
- Subject: Examine other player units at end of game
- From: Jim Kingdon <kingdon at panix dot com>
- Date: Wed, 3 May 2000 21:45:57 -0400
My expectation is that I should be able to examine all units
(including enemy and independent) after the game is over. As nearly
as I could guess from looking at the source code, that is the intent
too, it just doesn't work right.
Here is a patch which makes it work for me:
Index: tkmain.c
===================================================================
RCS file: /cvs/xconq/xconq/tcltk/tkmain.c,v
retrieving revision 1.63
diff -u -r1.63 tkmain.c
--- tkmain.c 2000/04/28 15:16:48 1.63
+++ tkmain.c 2000/05/04 01:39:54
@@ -1364,7 +1364,7 @@
out of our control. */
if (!in_play(unit)
|| unit->id != map->curunit_id
- || !side_controls_unit(dside, unit))
+ || !side_sees_unit(dside, unit))
unit = NULL;
set_current_unit(map, unit);
}
@@ -1692,7 +1692,7 @@
if (unit == oldunit)
return;
- if (unit == NULL || (in_play(unit) && side_controls_unit(dside, unit))) {
+ if (unit == NULL || (in_play(unit) && side_sees_unit(dside, unit))) {
map->curunit = unit;
map->curunit_id = (unit ? unit->id : 0);
}
Index: tkmap.c
===================================================================
RCS file: /cvs/xconq/xconq/tcltk/tkmap.c,v
retrieving revision 1.51
diff -u -r1.51 tkmap.c
--- tkmap.c 2000/04/28 15:18:41 1.51
+++ tkmap.c 2000/05/04 01:40:14
@@ -3470,7 +3470,7 @@
if (x_nearest_cell(mapw, sx, sy, &nx, &ny)) {
if (inside_area(nx, ny)) {
x_nearest_unit(mapw, sx, sy, &unit);
- if (unit != NULL && (!side_controls_unit(dside, unit)))
+ if (unit != NULL && (!side_sees_unit(dside, unit)))
unit = NULL;
set_current_unit(map, unit);
} else {