Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6490) Do not lose gameloss units in huts
Home

[Freeciv-Dev] (PR#6490) Do not lose gameloss units in huts

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6490) Do not lose gameloss units in huts
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sun, 12 Oct 2003 05:13:58 -0700
Reply-to: rt@xxxxxxxxxxxxxx

This patch prevents gameloss flagged units from dying when entering a hut.
I found this just too annoying when playtesting scenarios/patches that
used this flag.

  - Per

Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.259
diff -u -r1.259 unittools.c
--- server/unittools.c  8 Oct 2003 23:55:45 -0000       1.259
+++ server/unittools.c  12 Oct 2003 12:12:18 -0000
@@ -2309,7 +2309,8 @@
   struct player *pplayer = unit_owner(punit);
   bool ok = TRUE;
 
-  if (city_exists_within_city_radius(punit->x, punit->y, TRUE)) {
+  if (city_exists_within_city_radius(punit->x, punit->y, TRUE)
+      || unit_flag(punit, F_GAMELOSS)) {
     notify_player_ex(pplayer, punit->x, punit->y, E_HUT_BARB_CITY_NEAR,
                     _("Game: An abandoned village is here."));
   }

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