src/genworld_gui.cpp
changeset 9950 2a0d0769c0e3
parent 9910 2b23987e75d7
child 10145 849ba8b8626b
equal deleted inserted replaced
9949:392998225bdd 9950:2a0d0769c0e3
   954 	if (_network_dedicated) {
   954 	if (_network_dedicated) {
   955 		static uint last_percent = 0;
   955 		static uint last_percent = 0;
   956 
   956 
   957 		/* Never display 0% */
   957 		/* Never display 0% */
   958 		if (_tp.percent == 0) return;
   958 		if (_tp.percent == 0) return;
   959 		/* Reset if percent is lower then the last recorded */
   959 		/* Reset if percent is lower than the last recorded */
   960 		if (_tp.percent < last_percent) last_percent = 0;
   960 		if (_tp.percent < last_percent) last_percent = 0;
   961 		/* Display every 5%, but 6% is also very valid.. just not smaller steps then 5% */
   961 		/* Display every 5%, but 6% is also very valid.. just not smaller steps than 5% */
   962 		if (_tp.percent % 5 != 0 && _tp.percent <= last_percent + 5) return;
   962 		if (_tp.percent % 5 != 0 && _tp.percent <= last_percent + 5) return;
   963 		/* Never show steps smaller then 2%, even if it is a mod 5% */
   963 		/* Never show steps smaller than 2%, even if it is a mod 5% */
   964 		if (_tp.percent <= last_percent + 2) return;
   964 		if (_tp.percent <= last_percent + 2) return;
   965 
   965 
   966 		DEBUG(net, 1, "Map generation percentage complete: %d", _tp.percent);
   966 		DEBUG(net, 1, "Map generation percentage complete: %d", _tp.percent);
   967 		last_percent = _tp.percent;
   967 		last_percent = _tp.percent;
   968 
   968