(svn r9982) -Fix (r9874): autoreplacing vehicles from a group could sometimes add the new vehicle twice to the engine (EngineID, not total count) count in the group
authorbjarni
Tue, 29 May 2007 20:52:35 +0000
changeset 7243 ed7e9feb95dc
parent 7242 d72363a4042d
child 7244 7baac45a972c
(svn r9982) -Fix (r9874): autoreplacing vehicles from a group could sometimes add the new vehicle twice to the engine (EngineID, not total count) count in the group
src/autoreplace_cmd.cpp
--- a/src/autoreplace_cmd.cpp	Tue May 29 20:06:06 2007 +0000
+++ b/src/autoreplace_cmd.cpp	Tue May 29 20:52:35 2007 +0000
@@ -234,10 +234,6 @@
 				if (temp_v != NULL) {
 					DoCommand(0, (new_v->index << 16) | temp_v->index, 1, DC_EXEC, CMD_MOVE_RAIL_VEHICLE);
 				}
-			} else if (!IsDefaultGroupID(old_v->group_id) && IsValidGroupID(old_v->group_id)) {
-				/* Increase the new num engines of the group for the ships, aircraft, and road vehicles
-					The old new num engine is decrease in the destroyvehicle function */
-				GetGroup(old_v->group_id)->num_engines[new_v->engine_type]++;
 			}
 		}
 		/* We are done setting up the new vehicle. Now we move the cargo from the old one to the new one */