URL:
<http://gna.org/bugs/?19447>
Summary: Over maximum veteran level assigned initially to
unit
Project: Freeciv
Submitted by: cazfi
Submitted on: Tue 14 Feb 2012 11:56:36 PM EET
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
Status: Ready For Test
Assigned to: None
Originator Email:
Open/Closed: Open
Release:
Discussion Lock: Any
Operating System: None
Planned Release: 2.3.2, 2.4.0, 2.5.0
_______________________________________________________
Details:
create_unit_virtual() can get called with initial veteran level that exceeds
maximum for unit type. It then happily assigns that value to created unit.
Attached fix limits veterancy level to maximum for unit type inside
create_unit_virtual(). Similar check inside callers would be no more correct
than this, and by placing it to create_unit_virtual() all callers are handled
at once.
I think this bug could cause problems in S2_3 only with ruleset that has only
single veterancy level, but has some Veteran_Build -effect. In S2_4 and TRUNK
this is more serious problem as Veteran_Build value means number of levels and
thus multiple effects together can increase level unexpectedly, and effect
that gives just maximum level for one unit type can be over maximum for
another unit type.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 14 Feb 2012 11:56:36 PM EET Name: MaxVetLvlsForVunit.diff Size:
909B By: cazfi
<http://gna.org/bugs/download.php?file_id=15047>
-------------------------------------------------------
Date: Tue 14 Feb 2012 11:56:36 PM EET Name: MaxVetLvlsForVunit-S2_3.diff
Size: 903B By: cazfi
<http://gna.org/bugs/download.php?file_id=15048>
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?19447>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev