author | bjarni |
Wed, 19 Jan 2005 01:18:29 +0000 | |
changeset 1062 | 4131a8dfde94 |
parent 1061 | 35c487dcbecc |
child 1063 | 03fed43e58fc |
--- a/vehicle.c Tue Jan 18 23:48:55 2005 +0000 +++ b/vehicle.c Wed Jan 19 01:18:29 2005 +0000 @@ -1485,6 +1485,15 @@ } } + // updates the id of the front engine in the other units, since the front engine just got a new engine_id + // this is needed for wagon override + if ( v->u.rail.first_engine == 0xffff && v->next != NULL ) { + Vehicle *veh = v->next; + do { + veh->u.rail.first_engine = new_engine_type; + } while ( (veh=veh->next) != NULL ); + } + break; } case VEH_Road: