Version error: MapObjectivePacket when loading a (very) old map in editor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
High
|
Unassigned |
Bug Description
I've just tested an old map (https:/
UnhandledVersio
Packet Name: MapObjectivePacket
Saved Version: 1
Current Version: 2
Irritating the message talks about a "game" not a "map". I would expect: "This map was saved ..." when loading a map in editor.
Then i have unzipped the map and edited the file 'objective' to
packet_version="2"
instead of "1". After saving the file the map could be loaded in editor without any problems. Also starting a game is possible.
So i think the map isn't incompatible for the editor at all?
Related branches
- kaputtnik (community): Approve (testing)
-
Diff: 285 lines (+108/-32)14 files modifiedsrc/io/filesystem/zip_filesystem.cc (+26/-12)
src/io/filesystem/zip_filesystem.h (+5/-0)
src/map_io/map_objective_packet.cc (+2/-8)
src/map_io/map_objective_packet.h (+6/-1)
src/map_io/map_saver.cc (+1/-4)
src/map_io/widelands_map_loader.cc (+8/-7)
test/maps/Aquila.wmf/elemental (+11/-0)
test/maps/Aquila.wmf/extra_data (+4/-0)
test/maps/Aquila.wmf/objective (+4/-0)
test/maps/Aquila.wmf/player_names (+24/-0)
test/maps/Aquila.wmf/player_position (+8/-0)
test/maps/Aquila.wmf/scripting/editor_init.lua (+3/-0)
test/maps/Aquila.wmf/scripting/editor_test_loading.lua (+2/-0)
test/maps/Aquila.wmf/variable (+4/-0)
Changed in widelands: | |
assignee: | nobody → SirVer (sirver) |
Changed in widelands: | |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
assignee: | SirVer (sirver) → nobody |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
All maps should always stay compatible, so this is a regression and needs fixing for b19 - probably by just not loading objectives with an old version into the editor - since there are not supported by the game there is no reason to load them anyways.