src/order_cmd.cpp
branchnoai
changeset 10776 07203fc29812
parent 10715 6bdf79ffb022
child 10829 8a0ec0f0f928
--- a/src/order_cmd.cpp	Thu May 29 12:52:24 2008 +0000
+++ b/src/order_cmd.cpp	Thu May 29 15:56:32 2008 +0000
@@ -156,7 +156,7 @@
 	this->flags = 0;
 
 	/* First handle non-stop */
-	if (_settings.gui.sg_new_nonstop) {
+	if (_settings_client.gui.sg_new_nonstop) {
 		/* OFB_NON_STOP */
 		this->SetNonStopType((old_flags & 8) ? ONSF_NO_STOP_AT_ANY_STATION : ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);
 	} else {
@@ -176,7 +176,7 @@
 		} else if ((old_flags & 4) == 0) { // !OFB_FULL_LOAD
 			this->SetLoadType(OLF_LOAD_IF_POSSIBLE);
 		} else {
-			this->SetLoadType(_settings.gui.sg_full_load_any ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD);
+			this->SetLoadType(_settings_client.gui.sg_full_load_any ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD);
 		}
 
 		/* Finally fix the unload flags */
@@ -455,7 +455,7 @@
 
 	if (!HasOrderPoolFree(1)) return_cmd_error(STR_8831_NO_MORE_SPACE_FOR_ORDERS);
 
-	if (v->type == VEH_SHIP && IsHumanPlayer(v->owner) && _settings.pf.pathfinder_for_ships != VPF_NPF) {
+	if (v->type == VEH_SHIP && IsHumanPlayer(v->owner) && _settings_game.pf.pathfinder_for_ships != VPF_NPF) {
 		/* Make sure the new destination is not too far away from the previous */
 		const Order *prev = NULL;
 		uint n = 0;
@@ -1277,7 +1277,7 @@
 			}
 
 			/* Copy timetable if enabled */
-			if (_settings.order.timetabling && !DoCommandP(0, v->index | (i << 16) | (1 << 25),
+			if (_settings_game.order.timetabling && !DoCommandP(0, v->index | (i << 16) | (1 << 25),
 					bak->order[i].wait_time << 16 | bak->order[i].travel_time, NULL,
 					CMD_CHANGE_TIMETABLE | CMD_NO_TEST_IF_IN_NETWORK)) {
 				break;
@@ -1390,13 +1390,13 @@
 void CheckOrders(const Vehicle* v)
 {
 	/* Does the user wants us to check things? */
-	if (_settings.gui.order_review_system == 0) return;
+	if (_settings_client.gui.order_review_system == 0) return;
 
 	/* Do nothing for crashed vehicles */
 	if (v->vehstatus & VS_CRASHED) return;
 
 	/* Do nothing for stopped vehicles if setting is '1' */
-	if (_settings.gui.order_review_system == 1 && v->vehstatus & VS_STOPPED)
+	if (_settings_client.gui.order_review_system == 1 && v->vehstatus & VS_STOPPED)
 		return;
 
 	/* do nothing we we're not the first vehicle in a share-chain */
@@ -1575,7 +1575,7 @@
 
 Date GetServiceIntervalClamped(uint index)
 {
-	return (_settings.vehicle.servint_ispercent) ? Clamp(index, MIN_SERVINT_PERCENT, MAX_SERVINT_PERCENT) : Clamp(index, MIN_SERVINT_DAYS, MAX_SERVINT_DAYS);
+	return (_settings_game.vehicle.servint_ispercent) ? Clamp(index, MIN_SERVINT_PERCENT, MAX_SERVINT_PERCENT) : Clamp(index, MIN_SERVINT_DAYS, MAX_SERVINT_DAYS);
 }
 
 /**
@@ -1836,7 +1836,7 @@
 	if (CheckSavegameVersionOldStyle(5, 2)) {
 		/* Version older than 5.2 did not have a ->next pointer. Convert them
 		    (in the old days, the orderlist was 5000 items big) */
-		uint len = SlGetFieldLength();
+		size_t len = SlGetFieldLength();
 		uint i;
 
 		if (CheckSavegameVersion(5)) {