On Thu, 2006-01-26 at 15:27 +0000, [EMAIL PROTECTED] wrote: > Author: xan > Date: Thu Jan 26 16:27:20 2006 > New Revision: 9836
Hmm, I'm pretty sure that the next change which modifies this is a bug. Originally, we didn't set hitpoints_, and apply_modifications() looks at the hitpoints_ value cap it to max is modified. This makes valgrind complain that hitpoints_ is uninitialized (true). Initializing hitpoints_ before apply_modifications() is cool, *except* that apply_modifications can change (esp. increase) maxHitpoints_; in which case we end up capping hitpoints to the old top, and end up with all strong or resiliant units starting under max hp. Hence the need to cap it *after* apply_modifications(). Hope that helps! Rusty. -- ccontrol: http://ozlabs.org/~rusty/ccontrol
