src/yapf/yapf_ship.cpp
changeset 9354 845e07db4549
parent 9111 48ce04029fe4
child 9413 7042a8ec3fa8
equal deleted inserted replaced
9353:9d76aef9fe2b 9354:845e07db4549
   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 }