bugFreeciv - Bugs: bug #20825, Problems in Problems in...

 
 
Show feedback again

bug #20825: Problems in Problems in server/generator/mapgen.c: part 2, size limits in make_island().

Submitted by:  Micke <mss_8734>
Submitted on:  Fri 17 May 2013 05:59:26 PM UTC  
 
Category: generalSeverity: 2 - Minor
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open
Release: 2.6Operating System: Any
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 17 May 2013 05:59:26 PM UTC, original submission:

Problem 2>
On lines 2197 - 2200 we have:
if (islemass > lastplaced + 1 + lastplaced / 50) {
/* don't create big isles we can't place */
islemass = lastplaced + 1 + lastplaced / 50;
}

First, it seems odd to just assume an increase > 2% would always fail, regardless of available map space and landmass. For small islands even an attempted increment by 2 will be thwarted by this; attempting to create several islands with a random size in even such a small range as [2,10] will be seriously affected.
Second, this check is then followed by tests against the map size and size <= 0, but not against available landmass. This looks particularly odd.
Third, the function keeps decreasing the size until an island can be created or it reaches a lower limit supplied by the caller, which seems to make at least some of the above tests seem redundant.
Last and quite possibly least, I think this ought to be mentioned in the function summary; currently it only says one has to ‘create big islands first’, which would be logical even without the 2% hard limit.

Micke <mss_8734>

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mss_8734 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup