Remove legacy stream_location functions

These are no longer used for anything.
This commit is contained in:
ebaydayz
2016-04-17 21:23:25 -04:00
parent 4a32f34268
commit 2f45d46d05
8 changed files with 1 additions and 392 deletions

View File

@@ -113,7 +113,7 @@ if (_maxlocalspawned > 0) then { _spawnZedRadius = _spawnZedRadius * 3; };
if (_canSpawn) then {
_dis = _x distance player;
_checkLoot = (count (getArray (_config >> "lootPos"))) > 0;
_islocal = _x getVariable ["", false]; // object created locally via TownGenerator. See stream_locationFill.sqf
_islocal = _x getVariable ["", false]; // object created locally via TownGenerator.
//Make sure wrecks always spawn Zeds
_isWreck = _x isKindOf "CrashSite";

View File

@@ -1,65 +0,0 @@
//private ["_location","_distCfg","_configClass","_distAct","_rubbish","_config","_locHdr","_w8","_ahead","_forEachIndex"];
_w8 = _this select 0;
_rubbish = dayz_Trash == 1;
{
_location = _x select 0;
_distCfg = (_x select 2);
_configClass = _x select 1;
_distAct = player distance _location;
_ahead = (speed player) / 3.6 * 6;
if (!(_forEachIndex in dayz_locationsActive)) then {
if ((_distAct < _distCfg + dayz_spawnArea + _ahead) and _rubbish) then {
dayz_locationsActive set [count dayz_locationsActive,_forEachIndex];
_config = configFile >> "CfgTownGeneratorChernarus" >> _configClass;
_locHdr = configName _config;
//if (typeName _locHdr != "STRING") then { _locHdr = str _location; };
diag_log format ["%1: creating %2 objects at '%3'", __FILE__, count _config, _locHdr];
[_config, _w8] call stream_locationFill; // create wrecks & rubbish as local objects
};
} else {
if (_distAct > _distCfg + dayz_canDelete + _ahead) then {
_config = configFile >> "CfgTownGeneratorChernarus" >> _configClass;
_locHdr = configName _config;
//if (typeName _locHdr != "STRING") then { _locHdr = str _location; };
diag_log format ["%1: removing %2 objects from '%3'", __FILE__, count _config, _locHdr];
[_config, _w8] call stream_locationDel; // delete wrecks & rubbish
dayz_locationsActive = dayz_locationsActive - [_forEachIndex];
};
};
} forEach dayz_Locations;
/*
_location = 0;
_distCfg = 0;
_configClass = 0;
_distAct = 0;
{
_location = _x select 0;
_distCfg = (_x select 2);
_configClass = _x select 1;
_distAct = player distance _location;
if (!(_forEachIndex in dayz_gridsActive)) then {
if (_distAct < _distCfg) then {
dayz_gridsActive set [count dayz_gridsActive,_forEachIndex];
PVDZ_gridsActive = [_forEachIndex,_location];
publicVariableServer "PVDZ_gridsActive";
systemChat (str(_configClass));
};
} else {
if (_distAct > _distCfg) then {
dayz_gridsActive = dayz_gridsActive - [_forEachIndex];
PVDZ_gridsRemove = [_forEachIndex,_location];
publicVariableServer "PVDZ_gridsRemove";
diag_log("Out of Range: "+str(_forEachIndex));
};
};
} forEach dayz_GridSystem;
*/

View File

@@ -1,16 +0,0 @@
//private ["_config","_type","_position","_object","_list"];
_list = _this select 0;
//_w8 = _this select 1;
for "_i" from ((count _list) - 1) to 0 step -1 do
{
_config = (_list select _i);
if (isClass(_config)) then {
_type = getText (_config >> "ctype");
_position = getArray (_config >> "position");
_object = nearestObject [_position,_type];
deleteVehicle _object;
if ((_i % 25) == 0) then { uiSleep 0.01; };
};
uiSleep 0.001;
};
//diag_log ("CLEAR: " + str(_this));

View File

@@ -1,39 +0,0 @@
//private ["_config","_type","_position","_dir","_object","_list","_w8","_dis"];
_list = _this select 0;
_w8 = _this select 1;
for "_i" from ((count _list) - 1) to 0 step -1 do
{
_config = (_list select _i);
if (isClass(_config)) then {
_type = getText (_config >> "type");
_position = [] + getArray (_config >> "position");
_dir = getNumber (_config >> "direction");
//_onFire = getNumber (_config >> "onFire");
_dis = _position distance player;
_inVehicle = (vehicle player != player);
if (_dis > 2) then {
_object = _type createVehicleLocal [_position select 0,_position select 1,-100];
_object setDir _dir;
_object setPos [_position select 0,_position select 1,0];
_object setPosATL _position;
_object allowDamage false;
_object setVariable ["", true]; // SV used by player_spawnCheck
//if (_w8 AND {((_i % 25) == 0)}) then { uiSleep 0.01; };
} else {
if (!_inVehicle) then {
_object = _type createVehicleLocal [_position select 0,_position select 1,-100];
_object setDir _dir;
_object setPos [_position select 0,_position select 1,0];
_object setPosATL _position;
_object allowDamage false;
_object setVariable ["", true]; // SV used by player_spawnCheck
if (_w8 AND {((_i % 25) == 0)}) then { uiSleep 0.01; };
};
};
};
//uiSleep 0.001;
};
//diag_log ("FILL: " + str(_list));

View File

@@ -43,9 +43,6 @@ if (!isDedicated) then {
case "vanilla": {compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";};
};
player_crossbowBolt = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_crossbowBolt.sqf";
stream_locationFill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationFill.sqf";
stream_locationDel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationDel.sqf";
stream_locationCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationCheck.sqf";
player_music = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_music.sqf"; //Used to generate ambient music
//player_login = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_login.sqf"; //Used to generate ambient music
player_death = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf";

View File

@@ -118,29 +118,6 @@ if (isServer) then {
(owner _owner) publicVariableClient "PVDZ_receiveUnconscious";
};
"PVDZ_gridsActive" addPublicVariableEventHandler {
_gridref = (_this select 1) select 0;
_gridloc = (_this select 1) select 1;
if !(_gridref in dayz_gridsActive) then {
dayz_gridsActive set [count dayz_gridsActive,_gridref];
dayz_seedloot set [count dayz_seedloot,[_gridloc,_gridref]];
};
diag_log format ["%1, %2, %3", _gridref, dayz_gridsActive, dayz_seedloot];
};
"PVDZ_gridsRemove" addPublicVariableEventHandler {
_gridref = (_this select 1) select 0;
_gridloc = (_this select 1) select 1;
if (_gridref in dayz_gridsActive) then {
dayz_gridsActive = dayz_gridsActive - [_gridref];
dayz_deseedloot set [count dayz_deseedloot,[_gridloc,_gridref]];
};
diag_log format ["%1, %2", _gridref, dayz_gridsActive];
};
"PVDZ_Server_Simulation" addPublicVariableEventHandler {
_agent = (_this select 1) select 0;
_control = (_this select 1) select 1;

View File

@@ -1,5 +1,4 @@
disableSerialization;
dayz_Trash = 1; // 0=off, 1=on
//Model Variables
Bandit1_DZ = "Bandit1_DZ";
@@ -139,10 +138,6 @@ SleepTemperatur = 90 / 100; //First value = Minutes until player reaches the col
allowConnection = false;
dayz_serverObjectMonitor = [];
//Streaming Variables (player only)
dayz_Locations = [];
dayz_locationsActive = [];
//GUI
Dayz_GUI_R = 0.38; // 0.7 .38
Dayz_GUI_G = 0.63; // -0.63
@@ -368,7 +363,6 @@ dayz_animalDistance = 600;
dayz_plantDistance = 600;
dayz_maxMaxModels = 80; // max quantity of Man models (player or Z, dead or alive) around players. Below this limit we can spawn Z // max quantity of loot piles around players. Below this limit we can spawn some loot
dayz_spawnArea = 300; // radius around player where we can spawn loot & Z
dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks
dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
dayz_canDelete = 350; // Z, further than this distance from its "owner", will be deleted
@@ -529,8 +523,6 @@ if (isServer) then {
DayZ_removableObjects = ["Wire_cat1","Sandbag1_DZ","Hedgehog_DZ","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"];
//[10416.695, 4198.4634],[7982.2563, 1419.8256],[10795.93, 1419.8263],[7966.083, 4088.7463],[9259.7266, 2746.1985],[5200.5234, 3915.3274],[6494.1665, 2572.7798],[5216.6968, 1246.407],[2564.7244, 3915.3296],[3858.3674, 2572.782],[2580.8977, 1246.4092],[13398.995, 4400.5874],[12242.025, 2948.3196],[13551.842, 1832.2257],[14870.512, 3009.5117],[-178.19415, 1062.4478],[1099.2754, 2388.8206],[-194.36755, 3731.3679],[10394.215, 8322.1719],[7959.7759, 5543.5342],[10773.449, 5543.5342],
dayz_grid =[[7943.6025, 8212.4551],[9237.2461, 6869.9063],[5178.043, 8039.0361],[6471.686, 6696.4883],[5194.2163, 5370.1152],[2542.2439, 8039.0381],[3835.887, 6696.4902],[2558.4172, 5370.1172],[13376.514, 8524.2969],[12219.544, 7072.0273],[13529.361, 5955.9336],[14848.032, 7133.2197],[-200.67474, 5186.1563],[1076.7949, 6512.5283],[-216.84814, 7855.0771],[10293.751, 12197.736],[7859.312, 9419.0996],[10672.988, 9419.0996],[7843.1387, 12088.021],[9136.7822, 10745.474],[5077.5791, 11914.601],[6371.2222, 10572.052],[5093.7524, 9245.6816],[2441.78, 11914.604],[3735.4231, 10572.055],[2457.9534, 9245.6816],[13276.053, 12399.861],[12119.08, 10947.596],[13428.897, 9831.501],[14747.566, 11008.786],[-301.13867, 9061.7207],[976.33112, 10388.096],[-317.31201, 11730.642],[10271.271, 16321.429],[7836.8315, 13542.813],[10650.506, 13542.813],[7820.6582, 16211.718],[9114.3018, 14869.175],[5055.0986, 16038.3],[6348.7417, 14695.758],[5071.272, 13369.392],[2419.2996, 16038.305],[3712.9426, 14695.76],[2435.4729, 13369.392],[13253.568, 16523.553],[12096.6, 15071.295],[13406.416, 13955.209],[14725.089, 15132.486],[-323.61914, 13185.43],[953.85059, 14511.8],[-339.79248, 15854.346]];
dayz_gridsActive = [];
dayz_seedloot = [];
dayz_deseedloot = [];
dayz_ghostPlayers = [];
dayz_activePlayers = [];
@@ -552,47 +544,11 @@ if (isServer) then {
};
if (!isDedicated) then {
//Establish Location Streaming
_funcGetLocation =
{
dayz_Locations = [];
for "_i" from 0 to ((count _this) - 1) do
{
private ["_location","_config","_locHdr","_position","_size","_type"];
//Get Location Data from config
_config = _this select _i;
_position = getArray (_config >> "position");
_locHdr = configName _config;
_size = getNumber (_config >> "size");
dayz_Locations set [count dayz_Locations, [_position,_locHdr,_size]];
};
};
_cfgLocation = configFile >> "CfgTownGeneratorChernarus";
_cfgLocation call _funcGetLocation;
_funcGetGrid =
{
dayz_GridSystem = [];
for "_i" from 0 to ((count _this) - 1) do
{
private ["_location","_config","_locHdr","_position","_size","_type"];
_config = _this select _i;
_position = getArray (_config >> "position");
_locHdr = configName _config;
_size = getNumber (_config >> "size");
dayz_GridSystem set [count dayz_GridSystem, [_position,_locHdr,_size]];
};
};
_cfggrid = configFile >> "CfgGrid";
_cfggrid call _funcGetGrid;
dayz_buildingMonitor = []; //Buildings to check
dayz_bodyMonitor = [];
dayz_flyMonitor = [];
dayz_zedMonitor = [];
dayz_buildingBubbleMonitor = [];
dayz_gridsActive = [];
dayz_baseTypes = if (DZE_MissionLootTable) then {getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass")} else {getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass")};
//temperature variables