Do not load unneeded packages with map loading

Bug #1531463 reported by GunChleoc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

There are some packages that need to be loaded with the map when loading a savegame, but do not need to be loaded when starting a new game or opening a map in the editor.

An attempt to fix was made by putting the compatibility code back in:

https://code.launchpad.net/~widelands-dev/widelands/map_compatibility

A better fix would be not to save or load these packages at all when there is no actual game involved, because they cause compatibility problems.

The following packages have been identified as candidates for not to be included:

log("Writing Flag Data ... ");
log("Writing Road Data ... ");
log("Writing Map Objects ... "); - this is probably needed in editor, or isn't it?
// DATA PACKETS 3 sections here
log("Writing Node Ownership Data ... ");
log("Writing Exploration Data ... ");
log("Writing Players Unseen Data ... ");
log("Writing Scripting Data ... ");
log("Writing Objective Data ... ");

Related branches

Revision history for this message
kaputtnik (franku) wrote :

I am unsure if there are some packages will be needed in future in editor. See https://wl.widelands.org/forum/topic/1703/ regarding loading tribes. So if tribes are loaded as default, there are may several packages which depend on the tribes, aren't there?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Only if we have actual tribe objects on the map, like e.g. buildings. Scenarios might also have pre-filled buildings, but that's all done in Lua at the moment.

If we need them in the future, we could work with packet numbers: if packet number > x, load, otherwise don't load.

GunChleoc (gunchleoc)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → GunChleoc (gunchleoc)
SirVer (sirver)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.