Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/scout-compatibility into lp:widelands

2018-09-09 Thread GunChleoc
I have tested with an older savegame that had a scout on the road.

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/scout-compatibility/+merge/354345
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scout-compatibility.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/scout-compatibility into lp:widelands

2018-09-09 Thread Notabilis
Review: Approve diff, short testing

Diff looks good and a newly started game with this branch using a scout didn't 
showed any apparent problems.
-- 
https://code.launchpad.net/~widelands-dev/widelands/scout-compatibility/+merge/354345
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/scout-compatibility.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scout-compatibility into lp:widelands

2018-09-05 Thread bunnybot
Continuous integration builds have changed state:

Travis build 3901. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/424900021.
Appveyor build 3699. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_scout_compatibility-3699.
-- 
https://code.launchpad.net/~widelands-dev/widelands/scout-compatibility/+merge/354345
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/scout-compatibility into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/scout-compatibility into lp:widelands

2018-09-05 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/scout-compatibility 
into lp:widelands.

Commit message:
Remove savegame compatibility for scouts.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/scout-compatibility/+merge/354345

This one got missed when I ripped out the savegame compatibility code.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/scout-compatibility into lp:widelands.
=== modified file 'src/logic/map_objects/tribes/worker.cc'
--- src/logic/map_objects/tribes/worker.cc	2018-08-09 11:11:15 +
+++ src/logic/map_objects/tribes/worker.cc	2018-09-05 16:16:05 +
@@ -2933,21 +2933,7 @@
 
 	const Map& map = game.map();
 
-	if (scouts_worklist.empty()) {
-		// This routine assumes that scouts_worklist is not empty. There is one exception:
-		// First call to this routine after loading an old savegame. The least-invasive
-		// way to acquire old savegame compatibility was to simply ask the scout to go home early,
-		// under this special situation. Anybody reading this,
-		// TODO(kxq): Please remove this code block (and compatibility_2017 code from load routine)
-		// once Build 20 is out. Thanks.
-		log("Warning: sending scout home. Assuming the game was just started, from savegame, in "
-		"compatibility mode.\n");
-		pop_task(game);
-		schedule_act(game, 10);
-		return;
-	}
-
-	bool do_run = static_cast(state.ivar2 - game.get_gametime()) > 0;
+	const bool do_run = static_cast(state.ivar2 - game.get_gametime()) > 0;
 
 	// do not pop; this function is called many times per run.
 	struct PlaceToScout scoutat = scouts_worklist.back();
@@ -3016,12 +3002,8 @@
 void Worker::Loader::load(FileRead& fr) {
 	Bob::Loader::load(fr);
 	try {
-		uint8_t packet_version = fr.unsigned_8();
-		// TODO(kxq): Remove the compatibility_2017 code (and similars, dozen lines below) after B20
-		// TODO(kxq): Also remove the code fragment from Worker::scout_update with compatibility_2017
-		// in comment.
-		bool compatibility_2017 = 2 == packet_version;
-		if (packet_version == kCurrentPacketVersion || compatibility_2017) {
+		const uint8_t packet_version = fr.unsigned_8();
+		if (packet_version == kCurrentPacketVersion) {
 
 			Worker& worker = get();
 			location_ = fr.unsigned_32();
@@ -3032,14 +3014,7 @@
 worker.transfer_ = new Transfer(dynamic_cast(egbase()), worker);
 worker.transfer_->read(fr, transfer_);
 			}
-			unsigned veclen;
-			// TODO(kxq): Remove compatibility_2017 associated code from here and above,
-			// after build 20 has been released.
-			if (compatibility_2017) {
-veclen = 0;
-			} else {
-veclen = fr.unsigned_8();
-			}
+			const unsigned veclen = fr.unsigned_8();
 			for (unsigned q = 0; q < veclen; q++) {
 if (fr.unsigned_8()) {
 	const PlaceToScout gsw;

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp