Author: sveinung
Date: Wed Jan 14 14:01:23 2015
New Revision: 27675

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

See bug #23180

Modified:
    trunk/server/unithand.c

Modified: trunk/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=27675&r1=27674&r2=27675&view=diff
==============================================================================
--- trunk/server/unithand.c     (original)
+++ trunk/server/unithand.c     Wed Jan 14 14:01:23 2015
@@ -1623,7 +1623,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);
@@ -1742,7 +1742,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