File diff r20251:8c2b509af318 → r20252:76a6f1c78ce7
src/roadveh_cmd.cpp
Show inline comments
 
@@ -279,8 +279,10 @@ CommandCost CmdBuildRoadVehicle(TileInde
 
		v->spritenum = rvi->image_index;
 
		v->cargo_type = e->GetDefaultCargoType();
 
		v->cargo_cap = rvi->capacity;
 
		v->refit_cap = 0;
 

	
 
		v->last_station_visited = INVALID_STATION;
 
		v->last_loading_station = INVALID_STATION;
 
		v->engine_type = e->index;
 
		v->gcache.first_engine = INVALID_ENGINE; // needs to be set before first callback
 

	
 
@@ -311,6 +313,7 @@ CommandCost CmdBuildRoadVehicle(TileInde
 
		/* Call various callbacks after the whole consist has been constructed */
 
		for (RoadVehicle *u = v; u != NULL; u = u->Next()) {
 
			u->cargo_cap = u->GetEngine()->DetermineCapacity(u);
 
			u->refit_cap = 0;
 
			v->InvalidateNewGRFCache();
 
			u->InvalidateNewGRFCache();
 
		}