bugFreeciv - Bugs: bug #21296, Savegame loading doesn't honour...

 
 
Show feedback again

bug #21296: Savegame loading doesn't honour REVEAL_MAP_DEAD

Submitted by:  Jacob Nevins <jtn>
Submitted on:  Sat Nov 23 20:47:25 2013  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: Any
Planned Release: 2.5.4, 2.6.0, 3.0.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Tue Apr 12 20:37:56 2016, SVN revision 32370:

Stop loading saved game from revealing entire map to such dead players for whom
it should not be shown according to 'revealmap' setting.

Reported by Jacob Nevins

See bug #21296

(Browse SVN revision 32370)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Apr 12 20:37:49 2016, SVN revision 32369:

Stop loading saved game from revealing entire map to such dead players for whom
it should not be shown according to 'revealmap' setting.

Reported by Jacob Nevins

See bug #21296

(Browse SVN revision 32369)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Apr 12 20:37:40 2016, SVN revision 32368:

Stop loading saved game from revealing entire map to such dead players for whom
it should not be shown according to 'revealmap' setting.

Reported by Jacob Nevins

See bug #21296

(Browse SVN revision 32368)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Mar 1 13:50:41 2016, comment #4:

Saving the map information for dead players -> patch #7029
Revealing map also to teams once all members have died -> patch #7030

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Mar 1 02:46:33 2016, comment #3:

Attached fix makes the minimum change to stop the information leak.

(file #26901, file #26902)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue Mar 1 02:28:51 2016, comment #2:

> prevents the map being revealed for dead members of teams;
> again, this doesn't seem to be checked here


Here it would probably make more sense to check that there's nobody alive in the team rather than checking that player never was in any team (-> that team consist of the player alone)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu Jan 21 05:15:16 2016, comment #1:

Even if we can't show correct map for dead players, the intention of disabled REVEAL_MAP_DEAD is clearly to prohibit knowledge leak -> it would be better to show nothing than everything.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat Nov 23 20:47:25 2013, original submission:

In savegame.c:player_load_vision() and savegame2.c:sg_load_player_vision(), map_know_and_see_all() is called unconditionally for dead players, even if the 'revealmap' option doesn't allow dead players to see the map.

(Also, the normal check in kill_player() prevents the map being revealed for dead members of teams; again, this doesn't seem to be checked here.)

The system seems to take full advantage of the assumption that dead players get to see the whole map (as they always used to): savegame2.c:sg_save_player_vision() doesn't bother to save anything for dead players. So, the fix isn't straightforward; there'll need to be special handling for old savegames.
(I don't know if there's some reason it's hard to save the player map for dead players -- perhaps stuff was thrown away or became invalid when they died?)

Jacob Nevins <jtn>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by jtn (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.

     

    Error: not logged in

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Apr 12 20:38:07 2016cazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Tue Mar 1 02:46:33 2016cazfiAttached File-=>Added NoMapForLoadedNonRevealPlrs.patch, #26901
      Attached File-=>Added NoMapForLoadedNonRevealPlrs-S2_6.patch, #26902
      CategoryNone=>general
      StatusNone=>Ready For Test
    Wed Feb 3 23:53:53 2016cazfiPlanned Release2.5.3, 2.6.0, 3.0.0=>2.5.4, 2.6.0, 3.0.0
    Thu Jan 21 05:15:16 2016cazfiPlanned Release=>2.5.3, 2.6.0, 3.0.0
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup