Skip to content

Commit

Permalink
fog tweaks, spawn tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Jan 23, 2016
1 parent 5ae9624 commit 26166be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
7 changes: 4 additions & 3 deletions helpers/spawnBluforHQ.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
checkInsideMap = {
// 0 = mapsize
// 1 = spawnpos
_maximumX = _this select 0;
_maximumY = _this select 0;
_positionX = (_this select 1) select 0;
Expand Down Expand Up @@ -103,9 +105,8 @@ testSpawnPositions = {
if (count _testPos1 < 1) exitWith {_result = [1,nil,nil];};

// if map size is known and spawn position is outside map, result is 1
if (_mapSizeKnown) then {
if (!([_mapSize, _testPos1] call checkInsideMap)) exitWith {_result = [1,nil,nil]; diag_log format ["Calculating Spawnpos: Outside Map."]; _result };
};
if (!([_mapSize, _testPos1] call checkInsideMap) && _mapSizeKnown) exitWith {_result = [1,nil,nil]; diag_log format ["Calculating Spawnpos: Outside Map."]; _result };


if ([_testPos1, 5] call get_slope > 0.5) exitWith {_result = [1,nil,nil]; diag_log format ["Calculating Spawnpos: Not flat enough."]; _result };

Expand Down
17 changes: 9 additions & 8 deletions init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,19 @@ disableRemoteSensors true;

setCustomWeather = {
// skipTime -24;
10 setOvercast (_this select 0);
if (_this select 1) then {
10 setRain 1;
_fogDensity = random 1;
_fogFalloff = random 0.1;
10 setFog [_fogDensity, _fogFalloff, 0];
};
10 setOvercast (_this select 0);
if ((_this select 0) > 0.5) then {
_fogDensity = random 0.2;
_fogFalloff = random 0.01;
10 setFog [_fogDensity, _fogFalloff, 0];
};
if (_this select 1 && (_this select 0) > 0.7) then {
10 setRain 1;
_fogDensity = random 1;
_fogFalloff = random 0.05;
10 setFog [_fogDensity, _fogFalloff, 0];
};

setViewDistance 6000;
forceWeatherChange;
// skipTime 24;
Expand All @@ -72,7 +73,7 @@ if (isServer) then {

switch (WEATHER_SETTING) do {
case 0: {[0,false] call setCustomWeather;};
case 1: {[0.6,false] call setCustomWeather;};
case 1: {[0.69,false] call setCustomWeather;};
case 2: {[1,true] call setCustomWeather;};
case 3: {[random 1,true] call setCustomWeather;};
default {[0,false] call setCustomWeather;};
Expand Down

0 comments on commit 26166be

Please sign in to comment.