[Freeciv-Dev] Re: (PR#6695) nuclear causes core
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 30 Oct 2003, Paul Zastoupil wrote:
> I think any nuclear detonation on a city will cause a core in current
> HEAD.
Yep. Patch attached.
- Per
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.261
diff -u -r1.261 unittools.c
--- server/unittools.c 29 Oct 2003 08:00:39 -0000 1.261
+++ server/unittools.c 1 Nov 2003 10:59:56 -0000
@@ -2025,11 +2025,11 @@
}
/**************************************************************************
- nuke a square
- 1) remove all units on the square
- 2) half the size of the city on the square
- if it isn't a city square or an ocean square then with 50% chance
- add some fallout, then notify the client about the changes.
+ Nuke a square: 1) remove all units on the square, and 2) halve the
+ size of the city on the square.
+
+ If it isn't a city square or an ocean square then with 50% chance add
+ some fallout, then notify the client about the changes.
**************************************************************************/
static void do_nuke_tile(struct player *pplayer, int x, int y)
{
@@ -2065,11 +2065,9 @@
pcity->name);
}
- if (pcity->size > 1) { /* size zero cities are ridiculous -- Syela */
- pcity->size /= 2;
- auto_arrange_workers(pcity);
- send_city_info(NULL, pcity);
- }
+ city_reduce_size(pcity, pcity->size / 2);
+ auto_arrange_workers(pcity);
+ send_city_info(NULL, pcity);
}
if (!is_ocean(map_get_terrain(x, y)) && myrand(2) == 1) {
- [Freeciv-Dev] Re: (PR#6695) nuclear causes core,
Per I. Mathisen <=
|
|