"Bradley Arsenault" <[EMAIL PROTECTED]> writes: > On 4/16/07, Joe Wells <[EMAIL PROTECTED]> wrote: >> "Bradley Arsenault" <[EMAIL PROTECTED]> writes: >> >> > The bug was caused by a logic error. If you notice how the MapEditor >> > document in the wiki describes building levels (with construction >> > sites on even numbers starting at 0), my code would take the previous >> > level on a level 1 construction site, which is -1, when instead it >> > should be taking the current level. >> >> I am confused. The problem was happening when repairing normal >> buildings (with level number 1?). How did they get to be considered >> construction sites (with level number 0?)? Your description makes it >> sound like there is another bug. > > Level 1 building construction site: 0 > Level 1 building completed: 1 > Level 2 building construction site: 2 > Level 2 building completed: 3 > Level 3 building construction site: 4 > Level 3 building completed: 5 > > When a completeted level 1 building goes into construction, its > "technical level" goes from 1 to 0.
I assume you mean “into repair” (where result will be same level), not “into construction” (where result would be next level), right? So a level X building being repaired is treated like a level X construction site, except if you cancel the work it returns to level X (with damage) rather than level X - 1, right? > If we take prev level when its at 0, this is -1, which means invalid. -- Joe _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
