(svn r3136) -Fix: [autoreplace] all cargo in engines that consists of more than one vehicle will try to move cargo from all vehicles

currently this applies to planes and multiheaded train engines (no more lost airmail)
	added GetNextEnginePart() that returns the next vehicle in an engine nomatter what type it is
	when more types of multivehicle engines are added, they will have to be added here too or autoreplace will not remove all cargo
This commit is contained in:
bjarni
2005-11-04 20:52:03 +00:00
parent 170de2019a
commit 7715deec3d
3 changed files with 61 additions and 13 deletions

View File

@@ -961,7 +961,7 @@ int32 CmdStartStopTrain(int x, int y, uint32 flags, uint32 p1, uint32 p2)
* engine is 'started', first 'close' that before 'closing' our
* searched engine
*/
static Vehicle *GetRearEngine(const Vehicle *v, EngineID engine)
Vehicle *GetRearEngine(const Vehicle *v, EngineID engine)
{
Vehicle *u;
int en_count = 1;