src/yapf/yapf_ship.cpp
changeset 10703 2c998f3776d1
parent 10429 1b99254f9607
child 10775 7061477bfbcf
equal deleted inserted replaced
10702:d36547edcb86 10703:2c998f3776d1
   152 	// default is YAPF type 2
   152 	// default is YAPF type 2
   153 	typedef Trackdir (*PfnChooseShipTrack)(Vehicle*, TileIndex, DiagDirection, TrackBits);
   153 	typedef Trackdir (*PfnChooseShipTrack)(Vehicle*, TileIndex, DiagDirection, TrackBits);
   154 	PfnChooseShipTrack pfnChooseShipTrack = CYapfShip2::ChooseShipTrack; // default: ExitDir, allow 90-deg
   154 	PfnChooseShipTrack pfnChooseShipTrack = CYapfShip2::ChooseShipTrack; // default: ExitDir, allow 90-deg
   155 
   155 
   156 	// check if non-default YAPF type needed
   156 	// check if non-default YAPF type needed
   157 	if (_patches.forbid_90_deg)
   157 	if (_settings.pf.forbid_90_deg)
   158 		pfnChooseShipTrack = &CYapfShip3::ChooseShipTrack; // Trackdir, forbid 90-deg
   158 		pfnChooseShipTrack = &CYapfShip3::ChooseShipTrack; // Trackdir, forbid 90-deg
   159 	else if (_patches.yapf.disable_node_optimization)
   159 	else if (_settings.pf.yapf.disable_node_optimization)
   160 		pfnChooseShipTrack = &CYapfShip1::ChooseShipTrack; // Trackdir, allow 90-deg
   160 		pfnChooseShipTrack = &CYapfShip1::ChooseShipTrack; // Trackdir, allow 90-deg
   161 
   161 
   162 	Trackdir td_ret = pfnChooseShipTrack(v, tile, enterdir, tracks);
   162 	Trackdir td_ret = pfnChooseShipTrack(v, tile, enterdir, tracks);
   163 	return td_ret;
   163 	return td_ret;
   164 }
   164 }