src/vehicle.cpp
changeset 7038 aef974af56f2
parent 7014 533521754123
child 7070 2f4e1b2facc6
equal deleted inserted replaced
7037:64249224bb74 7038:aef974af56f2
   771 	DisasterVehicle_Tick,
   771 	DisasterVehicle_Tick,
   772 };
   772 };
   773 
   773 
   774 void CallVehicleTicks()
   774 void CallVehicleTicks()
   775 {
   775 {
   776 #ifdef ENABLE_NETWORK
       
   777 	/* hotfix for desync problem:
       
   778 	 *  for MP games invalidate the YAPF cache every tick to keep it exactly the same on the server and all clients */
       
   779 	if (_networking) {
       
   780 		YapfNotifyTrackLayoutChange(INVALID_TILE, INVALID_TRACK);
       
   781 	}
       
   782 #endif //ENABLE_NETWORK
       
   783 
       
   784 	_first_veh_in_depot_list = NULL; // now we are sure it's initialized at the start of each tick
   776 	_first_veh_in_depot_list = NULL; // now we are sure it's initialized at the start of each tick
   785 
   777 
   786 	Station *st;
   778 	Station *st;
   787 	FOR_ALL_STATIONS(st) LoadUnloadStation(st);
   779 	FOR_ALL_STATIONS(st) LoadUnloadStation(st);
   788 
   780