Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3407 closed defect (fixed)

Map Controlled Percentage bug.

Reported by: Stan Owned by: leper
Priority: Should Have Milestone: Alpha 19
Component: Core engine Keywords: patch
Cc: s0600204 Patch:

Description

How to reproduce :

  • In atlas, raise the water level until there is no ground, in my case it crashes.

Attachments (2)

3407.patch (648 bytes ) - added by s0600204 9 years ago.
Proposed fix
3407-v1.1.patch (669 bytes ) - added by s0600204 9 years ago.
Removed the ENSURE

Download all attachments as: .zip

Change History (6)

comment:1 by leper, 9 years ago

Cc: s0600204 added
Milestone: BacklogAlpha 19

Should be an assertion failure at ps/trunk/source/simulation2/components/CCmpTerritoryManager.cpp#L543, right? In which case we should just check if we have 0 after computing the passable cells and return 0 (or set it to -1 and return 0).

by s0600204, 9 years ago

Attachment: 3407.patch added

Proposed fix

comment:2 by s0600204, 9 years ago

Keywords: patch review added

Yep, sounds about right.

I'd prefer not setting the passable cells to -1 (and returning 0), because if a user hasn't returned the water level to below the ground by the next time the function in question is called, then Atlas will crash at the same point.

by s0600204, 9 years ago

Attachment: 3407-v1.1.patch added

Removed the ENSURE

comment:3 by leper, 9 years ago

Owner: set to leper
Resolution: fixed
Status: newclosed

In 17002:

Add check for non-passable (likely water-only) maps to territory percentage calculation.

Patch by s0600204. Fixes #3407.

comment:4 by leper, 9 years ago

Keywords: review removed

Thanks.

Note: See TracTickets for help on using tickets.