Complete.Org: Mailing Lists: Archives: freeciv-dev: December 1998:
[Freeciv-Dev] Suppress "Unit bought for 0 cost" messages.
Home

[Freeciv-Dev] Suppress "Unit bought for 0 cost" messages.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Suppress "Unit bought for 0 cost" messages.
From: Tony & <stuckey@xxxxxxxxxxxxxxxxx>
Date: Sun, 20 Dec 1998 00:06:45 -0600

        While watching an AI player game, I saw several of these messages.
They should be brutally suppressed.

Index: server/cityhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityhand.c,v
retrieving revision 1.31
diff -u -r1.31 cityhand.c
--- cityhand.c  1998/11/05 06:16:51     1.31
+++ cityhand.c  1998/12/20 06:03:02
@@ -424,8 +424,8 @@
     }
   }
   cost=city_buy_cost(pcity);
-   if (cost>pplayer->economic.gold)
-    return;
+  if ((!cost) || (cost>pplayer->economic.gold))
+   return;
 
   pplayer->economic.gold-=cost;
   if (pcity->shield_stock < total){

-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"When I was young, the sky was filled with stars.
 I watched them burn out one by one."  -Warren Zevon


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Suppress "Unit bought for 0 cost" messages., Tony & <=