Author: sveinung
Date: Wed Jan 14 14:03:00 2015
New Revision: 27678

URL: http://svn.gna.org/viewcvs/freeciv?rev=27678&view=rev
Log:
Do not consider a negative value of the effect Unit_No_Lose_Pop 'enabled'.

See bug #23180

Modified:
    branches/S2_5/server/unithand.c

Modified: branches/S2_5/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/unithand.c?rev=27678&r1=27677&r2=27678&view=diff
==============================================================================
--- branches/S2_5/server/unithand.c     (original)
+++ branches/S2_5/server/unithand.c     Wed Jan 14 14:03:00 2015
@@ -1046,7 +1046,7 @@
   
   if (pcity
       && city_size_get(pcity) > 1
-      && get_city_bonus(pcity, EFT_UNIT_NO_LOSE_POP) == 0
+      && get_city_bonus(pcity, EFT_UNIT_NO_LOSE_POP) <= 0
       && kills_citizen_after_attack(punit)) {
     city_reduce_size(pcity, 1, pplayer);
     city_refresh(pcity);
@@ -1165,7 +1165,7 @@
   if (punit->hp > 0
       && (pcity = tile_city(def_tile))
       && city_size_get(pcity) > 1
-      && get_city_bonus(pcity, EFT_UNIT_NO_LOSE_POP) == 0
+      && get_city_bonus(pcity, EFT_UNIT_NO_LOSE_POP) <= 0
       && kills_citizen_after_attack(punit)) {
     city_reduce_size(pcity, 1, pplayer);
     city_refresh(pcity);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to