[Freeciv-Dev] [bug #17984] city growth blocked without reason (and sometimes not blocked when it should)

2011-04-03 Thread Jacob Nevins

Follow-up Comment #1, bug #17984 (project freeciv):

 In attached savegame, after completing turn, you will see that 
 the growth of Beneventum appears to be blocked (see attached 
 screenshot).
 I know that growth may be blocked by not having some 
 improvements. but this is not the case.
 see growth_blocked savefile and screenshots
I think this is a misdiagnosis by the client.
Beneventum starts out at size 2 with foodbox 27/30, food +0.
Its garrison is then attacked by the Khazars, who win. Since it has no city
walls, its population is reduced by 1. Foodbox is then clipped to 20/20.
The client then calls common/city.c:city_turns_to_grow() to determine what to
display. The function is advertised as returning 0 if growth is blocked; this
happens if foodbox is full -- the code assumes that this can only be the case
if growth is blocked (which is normally true).
However, in this case, growth isn't really blocked, it's just an artifact of
the order in which the attack and city turn processing happened; if you hit
Turn Done again, Beneventum does grow.
Not sure what the fix is.

 Also, seems the if a city can grow but growing is unable to 
 support the citizen that will be created, it grows anyway.
This is a separate bug/wish, which should probably be under a separate
ticket. Some of the logic implemented for a similar situation in migration
(mgr_foodneeded) may help here.

___

Reply to this item at:

  http://gna.org/bugs/?17984

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17984] city growth blocked without reason (and sometimes not blocked when it should)

2011-04-02 Thread Angelo Locritani

URL:
  http://gna.org/bugs/?17984

 Summary: city growth blocked without reason (and sometimes
not blocked when it should)
 Project: Freeciv
Submitted by: alocritani
Submitted on: sab 02 apr 2011 11:39:26 GMT
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 2.3.0 beta4
 Discussion Lock: Any
Operating System: GNU/Linux
 Planned Release: 

___

Details:

city growth blocked without reason (and sometimes not blocked when it
should)

In attached savegame, after completing turn, you will see that the growth of
Beneventum appears to be blocked (see attached screenshot).
I know that growth may be blocked by not having some improvements. but this
is not the case.
see growth_blocked savefile and screenshots.

Also, seems the if a city can grow but growing is unable to support the
citizen that will be created, it grows anyway.
I think it shoul be blocked, to avoid the growth, shrink, wait, growth...
loop.
I've tested this second point modifing the terrain around the city with
editor.
see growth_not_blocked savefile



___

File Attachments:


---
Date: sab 02 apr 2011 11:39:26 GMT  Name: growth_blocked.sav.gz  Size: 55kB  
By: alocritani

http://gna.org/bugs/download.php?file_id=12769
---
Date: sab 02 apr 2011 11:39:26 GMT  Name: growth_not_blocked.sav.gz  Size:
39kB   By: alocritani

http://gna.org/bugs/download.php?file_id=12770
---
Date: sab 02 apr 2011 11:39:26 GMT  Name: growth_blocked.png  Size: 528kB  
By: alocritani

http://gna.org/bugs/download.php?file_id=12771
---
Date: sab 02 apr 2011 11:39:26 GMT  Name: growth_blocked_citydetails.png 
Size: 274kB   By: alocritani

http://gna.org/bugs/download.php?file_id=12772

___

Reply to this item at:

  http://gna.org/bugs/?17984

___
  Messaggio inviato con/da Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev