Skip to content

Commit

Permalink
possible fix for weather propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Jan 23, 2016
1 parent f81116e commit 6c017a2
Show file tree
Hide file tree
Showing 4 changed files with 308 additions and 290 deletions.
4 changes: 2 additions & 2 deletions description.ext
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ class grad_india
textureVehicle = ""; // Does nothing currently, reserved for future use
};

class grad_heli
class grad_air
{
displayName = "GRAD Heli"; // Name displayed in Arsenal
displayName = "GRAD Air"; // Name displayed in Arsenal
author = "Gruppe Adler"; // Author displayed in Arsenal
texture = "pic\insignia\air.paa"; // Image path
textureVehicle = ""; // Does nothing currently, reserved for future use
Expand Down
2 changes: 1 addition & 1 deletion helpers/spawnBluforHQ.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ testSpawnPositions = {
_testVehicle1 = (_items select 0) createVehicleLocal _testPos1;


_testPos2 = [_testPos1,[30,50], random 360,0,[1,500]] call SHK_pos;
_testPos2 = [_testPos1,[30,50], random 360,0,[1,150]] call SHK_pos;
if (count _testPos2 < 1) exitWith {_result = [1,nil,nil]; diag_log format ["Calculating Spawnpos: No matching second pos."]; _result};
if (_testPos1 distance _testPos2 < 10) exitWith {deleteVehicle _testVehicle1; _result = [1,nil,nil]; diag_log format ["Calculating Spawnpos: HQ too close on marker."]; _result};
if ([_testPos2, 5] call get_slope > 0.5) exitWith {deleteVehicle _testVehicle1;_result = [1,nil,nil]; diag_log format ["Calculating Spawnpos: Not flat enough."]; _result};
Expand Down
23 changes: 15 additions & 8 deletions init.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,17 @@ disableRemoteSensors true;

setCustomWeather = {
// skipTime -24;
0 setOvercast (_this select 0);
10 setOvercast (_this select 0);
if (_this select 1) then {
10 setRain 1;
10 setFog [1, 0.01, 0];
};
setViewDistance 6000;
forceWeatherChange;
// skipTime 24;
};

switch (WEATHER_SETTING) do {
case 0: {[0] call setCustomWeather;};
case 1: {[0.4] call setCustomWeather;};
case 2: {[1] call setCustomWeather;};
case 3: {[random 1] call setCustomWeather;};
default {[0] call setCustomWeather;};
};



if (!isMultiplayer) then { // Editor
Expand All @@ -63,6 +62,14 @@ if (isServer) then {

// set to full moon date
setDate [2015, 2, 2, TIME_OF_DAY, 1];

switch (WEATHER_SETTING) do {
case 0: {[0,false] call setCustomWeather;};
case 1: {[0.4,false] call setCustomWeather;};
case 2: {[1,true] call setCustomWeather;};
case 3: {[random 1,true] call setCustomWeather;};
default {[0,false] call setCustomWeather;};
};
// set time acceleration
setTimeMultiplier TIME_ACCELERATION;

Expand Down
Loading

0 comments on commit 6c017a2

Please sign in to comment.