openttd.c
changeset 5352 82a50c80b0c4
parent 5350 db5f6bf223d7
child 5363 fe172941ea9e
child 5564 6e1b3ea1ba7f
equal deleted inserted replaced
5351:0980b66406af 5352:82a50c80b0c4
  1557 		SettingsDisableElrail(_patches.disable_elrails);
  1557 		SettingsDisableElrail(_patches.disable_elrails);
  1558 	}
  1558 	}
  1559 
  1559 
  1560 	return true;
  1560 	return true;
  1561 }
  1561 }
       
  1562 
       
  1563 /** Reload all NewGRF files during a running game. This is a cut-down
       
  1564  * version of AfterLoadGame().
       
  1565  * XXX - We need to reset the vehicle position hash because with a non-empty
       
  1566  * hash AfterLoadVehicles() will loop infinitely. We need AfterLoadVehicles()
       
  1567  * to recalculate vehicle data as some NewGRF vehicle sets could have been
       
  1568  * removed or added and changed statistics */
       
  1569 void ReloadNewGRFData(void)
       
  1570 {
       
  1571 	/* reload grf data */
       
  1572 	GfxLoadSprites();
       
  1573 	LoadStringWidthTable();
       
  1574 	/* reload vehicles */
       
  1575 	ResetVehiclePosHash();
       
  1576 	AfterLoadVehicles();
       
  1577 	/* update station and waypoint graphics */
       
  1578 	AfterLoadWaypoints();
       
  1579 	AfterLoadStations();
       
  1580 	/* redraw the whole screen */
       
  1581 	MarkWholeScreenDirty();
       
  1582 }