Jump to content

FAO: Devs Fix for too much rain


Brian Soanes

Recommended Posts

As per 

 

This will give slightly less chance of rain whilst retaining dynamic conditions

private["_aa","_ab","_ac","_ad","_ae","_af","_ag","_ah","_ai","_aj","_ak","_al","_am"];
if !(EPOCH_WeatherStaticForecast isEqualTo[])then
{
	_af=EPOCH_WeatherStaticForecast select 0;
	_ag=EPOCH_WeatherStaticForecast select 1;
	_ah=EPOCH_WeatherStaticForecast select 2;
	_ai=EPOCH_WeatherStaticForecast select 3;
	_aj=EPOCH_WeatherStaticForecast select 4;
	diag_log format["DEBUG: static weather: %1",EPOCH_WeatherStaticForecast];
}
else
{
	_al=["Weather",(call EPOCH_fn_InstanceID)]call EPOCH_server_hiveGET;
	if((_al select 0)==1 && typeName(_al select 1)=="ARRAY" && !((_al select 1)isEqualTo[]))then
	{
		_ak=_al select 1;
		_af=_ak select 0;
		_ag=_ak select 1;
		_ah=_ak select 2;
		_ai=_ak select 3;
		_aj=_ak select 4;
		diag_log format["DEBUG: hive weather: %1",_ak];
	};
};
_am=
	if(sunOrMoon < 1)then
	{
		(random 35)+15
	}
	else
	{
		(random 75)+50
	};
EPOCH_CURRENT_WEATHER=
	if(isNil "_af")then
	{
		_am
	}
	else
	{
		_af
	};
publicVariable "EPOCH_CURRENT_WEATHER";
_ab=
	if(isNil "_ah")then
	{
		[random 0.2,random 0.2,random 20]
	}
	else
	{
		_ah
	};
_aa=
	if(isNil "_ag")then
	{
		_rain = (random(random 0.7));
		if (_rain < 0.25)then{_rain = 0;};
		_rain
	}
	else
	{
		_ag
	};
_ac=
	if(isNil "_ai")then
	{
		_overcast = (random(random 0.6));
		if (_overcast < 0.15)then{_overcast = 0;};
		_overcast
	}
	else
	{
		_ai
	};
EPOCH_WeatherChangeTime setFog _ab;
EPOCH_WeatherChangeTime setOvercast _ac;
EPOCH_WeatherChangeTime setRain _aa;
_ad=random 10-5;
_ae=random 10-5;
if(_aa > 0.5)then
{
	_ad=random 20-10;
	_ae=random 20-10;
};
if !(isNil "_aj")then
{
	_ad=_aj select 0;
	_ae=_aj select 1;
};
setWind[_ad,_ae,true];
if(_this)then
{
	forceWeatherChange;
};
diag_log format["Weather Change: fog: %1 rain: %2 overcast: %3 windx: %4 windz: %5 forced: %6",_ab,_ac,_aa,_ad,_ae,_this];

Link to comment
Share on other sites

ok brian didnt have to make me look stupid bro ^ lol totaly forgot about that in the hpp but yeh thanks man for reminding me also what settings really affect how fast clients connect to your server and how to keep the server frames up as high as i can would be a big help i mean do i need to just take out the min and maxium bandwidth or what just wish there was a button to push and bam its fixed any insight would be great.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...