mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
1.7.5.M1D15 remove unused files
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
/***********************************************************
|
||||
REQUEST FROM hive
|
||||
- Function
|
||||
- result = [_key] call fnc_usec_hive_request;
|
||||
************************************************************/
|
||||
private["_key","_pipe","_result","_resultArray","_buildings","_stream","_data","_attempt"];
|
||||
_key = _this select 0;
|
||||
_confirm = _this select 1;
|
||||
_resultArray = [];
|
||||
hiveContact = true;
|
||||
_attempt = 0;
|
||||
|
||||
//startLoadingScreen ["Accessing hive"];
|
||||
//diag_log format ["hive: Request: %1", _key];
|
||||
while {true} do {
|
||||
//Wait until not in use
|
||||
scopeName "usePipe";
|
||||
while {true} do {
|
||||
scopeName "pipeWaiting5";
|
||||
_pipe = [dayZ_hivePipe1] call jayarma2lib_fnc_openpipe;
|
||||
if ((_pipe != "_JERR_PIPE_INVALID")) then {breakOut "pipeWaiting5";};
|
||||
};
|
||||
//Send Key
|
||||
_ret = [_pipe, _key] call jayarma2lib_fnc_writepipe;
|
||||
//Wait until hive replies
|
||||
while {true} do {
|
||||
scopeName "pipeWaiting6";
|
||||
_data = [_pipe] call jayarma2lib_fnc_readpipe;
|
||||
if (!(isNil "_data") and (_data != "_JERR_NULL")) then {breakOut "pipeWaiting6";};
|
||||
};
|
||||
//Release hive
|
||||
[_pipe] call jayarma2lib_fnc_closepipe;
|
||||
//Do we have an answer?
|
||||
if(_data == "_JERR_FALSE" and _confirm) then {
|
||||
if (_attempt > 10) then {
|
||||
breakOut "usePipe";
|
||||
} else {
|
||||
//Retry the read
|
||||
diag_log format ["hive: Failed with: %1, Retrying", _data];
|
||||
};
|
||||
} else {
|
||||
breakOut "usePipe";
|
||||
};
|
||||
_attempt = _attempt + 1;
|
||||
};
|
||||
//diag_log format ["hive: Received: %1", _data];
|
||||
//endLoadingScreen;
|
||||
|
||||
//Return information
|
||||
_resultArray = call compile format ["%1",_data];
|
||||
_resultArray;
|
||||
@@ -1,70 +0,0 @@
|
||||
/***********************************************************
|
||||
REQUEST FROM hive
|
||||
- Function
|
||||
- result = [_key] call fnc_usec_hive_request;
|
||||
************************************************************/
|
||||
private["_key","_pipe","_result","_resultArray","_buildings","_stream","_data","_attempt","_result1","_result2"];
|
||||
_key = _this select 0;
|
||||
_confirm = _this select 1;
|
||||
_resultArray = [];
|
||||
hiveContact = true;
|
||||
_attempt = 0;
|
||||
_result1 = "";
|
||||
_result2 = "";
|
||||
|
||||
//startLoadingScreen ["Accessing hive"];
|
||||
//diag_log format ["hive: Request: %1", _key];
|
||||
while {true} do {
|
||||
//Wait until not in use
|
||||
scopeName "usePipe";
|
||||
while {true} do {
|
||||
scopeName "pipeWaiting5";
|
||||
_pipe = [dayZ_hivePipe1] call jayarma2lib_fnc_openpipe;
|
||||
if ((_pipe != "_JERR_PIPE_INVALID")) then {breakOut "pipeWaiting5";};
|
||||
};
|
||||
//Send Key
|
||||
_ret = [_pipe, _key] call jayarma2lib_fnc_writepipe;
|
||||
//Wait until hive replies
|
||||
while {true} do {
|
||||
scopeName "pipeWaiting6";
|
||||
_data = [_pipe] call jayarma2lib_fnc_readpipe;
|
||||
if (!(isNil "_data") and (_data != "_JERR_NULL")) then {breakOut "pipeWaiting6";};
|
||||
};
|
||||
|
||||
_result1 = call compile format ["%1",_data];
|
||||
|
||||
_ret = [_pipe, "['OK']"] call jayarma2lib_fnc_writepipe;
|
||||
_data = "";
|
||||
|
||||
//Send Key
|
||||
_ret = [_pipe, _key] call jayarma2lib_fnc_writepipe;
|
||||
//Wait until hive replies
|
||||
while {true} do {
|
||||
scopeName "pipeWaiting6";
|
||||
_data = [_pipe] call jayarma2lib_fnc_readpipe;
|
||||
if (!(isNil "_data") and (_data != "_JERR_NULL")) then {breakOut "pipeWaiting6";};
|
||||
};
|
||||
|
||||
_result2 = call compile format ["%1",_data];
|
||||
|
||||
//Release hive
|
||||
[_pipe] call jayarma2lib_fnc_closepipe;
|
||||
//Do we have an answer?
|
||||
if(_data == "_JERR_FALSE" and _confirm) then {
|
||||
if (_attempt > 10) then {
|
||||
breakOut "usePipe";
|
||||
} else {
|
||||
//Retry the read
|
||||
diag_log format ["hive: Failed with: %1, Retrying", _data];
|
||||
};
|
||||
} else {
|
||||
breakOut "usePipe";
|
||||
};
|
||||
_attempt = _attempt + 1;
|
||||
};
|
||||
//diag_log format ["hive: Received: %1", _data];
|
||||
//endLoadingScreen;
|
||||
|
||||
//Return information
|
||||
_resultArray = _result1;
|
||||
_resultArray;
|
||||
@@ -1,53 +0,0 @@
|
||||
/***********************************************************
|
||||
REQUEST FROM hive
|
||||
- Function
|
||||
- result = [_key] call fnc_usec_hive_request;
|
||||
************************************************************/
|
||||
private["_key","_pipe","_result","_resultArray","_buildings","_stream","_data","_attempt"];
|
||||
_key = _this select 0;
|
||||
_confirm = _this select 1;
|
||||
dayz_resultArray = [];
|
||||
hiveContact = true;
|
||||
_attempt = 0;
|
||||
|
||||
//startLoadingScreen ["Accessing hive"];
|
||||
//diag_log format ["hive: Request: %1", _key];
|
||||
while {true} do {
|
||||
//Wait until not in use
|
||||
scopeName "usePipe";
|
||||
while {true} do {
|
||||
scopeName "pipeWaiting5";
|
||||
_pipe = [dayZ_hivePipe1] call jayarma2lib_fnc_openpipe;
|
||||
if ((_pipe != "_JERR_PIPE_INVALID")) then {breakOut "pipeWaiting5";};
|
||||
};
|
||||
sleep 0.1;
|
||||
//Send Key
|
||||
_ret = [_pipe, _key] call jayarma2lib_fnc_writepipe;
|
||||
//Wait until hive replies
|
||||
while {true} do {
|
||||
scopeName "pipeWaiting6";
|
||||
_data = [_pipe] call jayarma2lib_fnc_readpipe;
|
||||
if (!(isNil "_data") and (_data != "_JERR_NULL")) then {breakOut "pipeWaiting6";};
|
||||
sleep 0.01;
|
||||
};
|
||||
sleep 0.1;
|
||||
//Release hive
|
||||
[_pipe] call jayarma2lib_fnc_closepipe;
|
||||
//Do we have an answer?
|
||||
if(_data == "_JERR_FALSE" and _confirm) then {
|
||||
if (_attempt > 10) then {
|
||||
breakOut "usePipe";
|
||||
} else {
|
||||
//Retry the read
|
||||
diag_log format ["hive: Failed with: %1, Retrying", _data];
|
||||
};
|
||||
} else {
|
||||
breakOut "usePipe";
|
||||
};
|
||||
_attempt = _attempt + 1;
|
||||
};
|
||||
//diag_log format ["hive: Received: %1", _data];
|
||||
//endLoadingScreen;
|
||||
|
||||
//Return information
|
||||
dayz_resultArray = call compile format ["%1",_data];
|
||||
@@ -1,66 +0,0 @@
|
||||
private["_type","_location","_dir","_character","_tent","_class","_id"];
|
||||
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
|
||||
_class = _this select 3;
|
||||
_location = getPosATL player;
|
||||
_dir = getDir player;
|
||||
player allowdamage false;
|
||||
diag_log ("PUBLISH: Attempt " + _class);
|
||||
_worldspace = [_dir,_location];
|
||||
|
||||
_object = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
_object setdir _dir;
|
||||
_object setpos _location;
|
||||
_object setVariable ["CharacterID", "0", true];
|
||||
sleep 1;
|
||||
_dam = 1;
|
||||
_hitpoints = _object call vehicle_getHitpoints;
|
||||
_object setFuel 0;
|
||||
{
|
||||
_selection = getText(configFile >> "cfgVehicles" >> _class >> "HitPoints" >> _x >> "name");
|
||||
if (_x != "HitEngine" and _x != "HitFuel") then {
|
||||
_dam = 1;
|
||||
} else {
|
||||
_dam = 0.85;
|
||||
};
|
||||
[_object,_selection,_dam] call object_setFixServer;
|
||||
//_object setHit[_selection,1];
|
||||
} forEach _hitpoints;
|
||||
_object setvelocity [1,0,0];
|
||||
player reveal _object;
|
||||
|
||||
//Send request
|
||||
|
||||
_array = [];
|
||||
_dam = 1;
|
||||
{
|
||||
_hit = [_object,_x] call object_getHit;
|
||||
_selection = getText (configFile >> "CfgVehicles" >> _class >> "HitPoints" >> _x >> "name");
|
||||
if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
|
||||
} forEach _hitpoints;
|
||||
|
||||
//add to database
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
//Send request
|
||||
//61 to 120
|
||||
//207 to 208
|
||||
for "_x" from 61 to 120 do {
|
||||
_key = format["CHILD:301:%1:%2:%3:%4:%5:%6:%7:%8:",_x, _class, 0 , 0, _worldspace, [], _array, 0];
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
_key call server_hiveWrite;
|
||||
//sleep 0.5;
|
||||
/*
|
||||
waitUntil{!hiveInUse};
|
||||
hiveInUse = true;
|
||||
//Send request
|
||||
_primary = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
|
||||
hiveInUse = false;
|
||||
*/
|
||||
};
|
||||
|
||||
diag_log ("PUBLISH: Result " + str(_result));
|
||||
if (count _result > 1) then {
|
||||
_id = _result select 1;
|
||||
_object setVariable ["ObjectID", _id, true];
|
||||
diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_id));
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
[_objectID,_objectUID] call local_deleteObj;
|
||||
*/
|
||||
private["_id","_uid","_key"];
|
||||
_id = _this select 0;
|
||||
_uid = _this select 1;
|
||||
|
||||
if (isServer) then {
|
||||
//remove from database
|
||||
if (parseNumber _id > 0) then {
|
||||
//Send request
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Deleted by ID: %1",_id];
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Deleted by UID: %1",_uid];
|
||||
};
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
private["_qty","_item","_meat"];
|
||||
_item = _this select 0;
|
||||
_qty = _this select 1;
|
||||
_meat = 0;
|
||||
_loop = true;
|
||||
if (local _item) then {
|
||||
for "_x" from 1 to _qty do {
|
||||
_item addMagazine "FoodSteakRaw";
|
||||
};
|
||||
sleep 2;
|
||||
_timer = time;
|
||||
while {_loop} do {
|
||||
_meat = count magazines _item;
|
||||
if (_meat == 0) then {_loop = false};
|
||||
if ((time - _timer) > 300) then {_loop = false};
|
||||
sleep 1;
|
||||
};
|
||||
dayzHideBody = _item;
|
||||
publicVariable "dayzHideBody";
|
||||
hideBody _item;
|
||||
sleep 10;
|
||||
deleteVehicle _item;
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
private["_qty","_item","_meat"];
|
||||
_item = _this select 0;
|
||||
_qty = _this select 1;
|
||||
_meat = 0;
|
||||
_loop = true;
|
||||
if (local _item) then {
|
||||
for "_x" from 1 to _qty do {
|
||||
_item addMagazine "ItemZombieParts";
|
||||
};
|
||||
sleep 2;
|
||||
_timer = time;
|
||||
while {_loop} do {
|
||||
_meat = count magazines _item;
|
||||
if (_meat == 0) then {_loop = false};
|
||||
if ((time - _timer) > 300) then {_loop = false};
|
||||
sleep 1;
|
||||
};
|
||||
dayzHideBody = _item;
|
||||
publicVariable "dayzHideBody";
|
||||
hideBody _item;
|
||||
sleep 10;
|
||||
deleteVehicle _item;
|
||||
};
|
||||
@@ -1,34 +0,0 @@
|
||||
private["_type","_location","_dir","_character","_tent","_class","_id"];
|
||||
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
|
||||
_charID = _this select 0;
|
||||
_object = _this select 1;
|
||||
_worldspace = _this select 2;
|
||||
_class = _this select 3;
|
||||
_id = 0;
|
||||
|
||||
_allowed = [_object, (name player)] call check_publishobject;
|
||||
if (!_allowed) exitWith { };
|
||||
|
||||
diag_log ("PUBLISH: Attempt " + str(_object));
|
||||
_dir = _worldspace select 0;
|
||||
_location = _worldspace select 1;
|
||||
|
||||
_object = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
_object setdir _dir;
|
||||
_object setpos _location;
|
||||
_object setVariable ["OwnerID", _charID, true];
|
||||
|
||||
//add to database
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
//get UID
|
||||
_uid = _object call dayz_objectUID;
|
||||
|
||||
//Send request
|
||||
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
_key call server_hiveWrite;
|
||||
|
||||
_object setVariable ["ObjectUID", _uid, true];
|
||||
|
||||
diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
|
||||
@@ -1,45 +0,0 @@
|
||||
private["_car","_hitpoints","_dam","_selection","_type","_pos","_dir"];
|
||||
_type = _this select 0;
|
||||
_pos = _this select 1;
|
||||
_dir = _this select 2;
|
||||
_car = _type createVehicle _pos;
|
||||
_car setpos _pos;
|
||||
_car setdir _dir;
|
||||
_hitpoints = _car call vehicle_getHitpoints;
|
||||
_dam = 1;
|
||||
_car setFuel 0;
|
||||
{
|
||||
_selection = getText(configFile >> "cfgVehicles" >> typeOf _car >> "HitPoints" >> _x >> "name");
|
||||
if (_x != "HitEngine" and _x != "HitFuel") then {
|
||||
_dam = 1;
|
||||
} else {
|
||||
_dam = 0.85;
|
||||
};
|
||||
[_car,_selection,_dam] call object_setFixServer;
|
||||
} forEach _hitpoints;
|
||||
_car setvelocity [1,0,0];
|
||||
player reveal _car;
|
||||
dayzVehicleInit = _car;
|
||||
publicVariable "dayzVehicleInit";
|
||||
if (isServer) then {
|
||||
_car call fnc_vehicleEventHandler;
|
||||
[0,_car,[_dir,_pos],_type] call local_publishObj;
|
||||
};
|
||||
|
||||
//Wait for HIVE to be free
|
||||
waitUntil{!hiveInUse};
|
||||
hiveInUse = true;
|
||||
|
||||
//Send request
|
||||
_hitpoints = _car call vehicle_getHitpoints;
|
||||
_array = [];
|
||||
_dam = 1;
|
||||
{
|
||||
_hit = [_car,_x] call object_getHit;
|
||||
_selection = getText (configFile >> "CfgVehicles" >> (typeOf _car) >> "HitPoints" >> _x >> "name");
|
||||
if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
|
||||
} forEach _hitpoints;
|
||||
|
||||
copyToClipboard str(_array);
|
||||
|
||||
_car
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
Initial Idea by Daimyo
|
||||
|
||||
System test to see how this would handle in the game. Other systems will be brought in to play along side this if full permission is givin.
|
||||
For now this is just a test system based on the idea.
|
||||
*/
|
||||
|
||||
private["_dialog","_dangerNear","_inCombat","_inVehicle"];
|
||||
|
||||
_inCombat = player getVariable["startcombattimer",0];
|
||||
_inVehicle = (vehicle player != player);
|
||||
_dangerNear = (getPosATL player) nearEntities [["zZombie_Base","CAManBase"],30];
|
||||
|
||||
if (_inVehicle && (speed player != 0)) exitwith {};
|
||||
|
||||
if (count _dangerNear > 1) then {
|
||||
player setVariable["startcombattimer", 1, true];
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
private["_playerName","_center","_group"];
|
||||
_playerName = _this;
|
||||
|
||||
cutText [format["%1 has combat logged!",_playerName], "PLAIN DOWN"];
|
||||
|
||||
_center = createCenter sideLogic;
|
||||
_group = createGroup _center;
|
||||
cl_gamelogic = _group createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"];
|
||||
cl_gamelogic sideChat format["(COMBAT LOG) %1",_playerName];
|
||||
deleteVehicle cl_gamelogic;
|
||||
@@ -1,75 +0,0 @@
|
||||
private["_int","_newModel","_wait","_playerID","_playerObj","_randomSpot","_publishTo","_primary","_secondary","_key","_result","_charID","_playerObj","_playerName","_finished","_spawnPos","_spawnDir","_items","_counter","_magazines","_weapons","_group","_backpack","_worldspace","_direction","_newUnit","_score","_position","_isNew","_inventory","_backpack","_medical","_survival","_stats","_state"];
|
||||
//Set Variables
|
||||
_playerID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerName = name _playerObj;
|
||||
_worldspace = [];
|
||||
|
||||
waitUntil{allowConnection};
|
||||
|
||||
//Variables
|
||||
_inventory = [];
|
||||
_backpack = [];
|
||||
_items = [];
|
||||
_magazines = [];
|
||||
_weapons = [];
|
||||
_medicalStats = [];
|
||||
_survival = [0,0,0];
|
||||
_tent = [];
|
||||
_state = [];
|
||||
_direction = 0;
|
||||
_newUnit = objNull;
|
||||
|
||||
if (_playerID == "") then {
|
||||
_playerID = getPlayerUID _playerObj;
|
||||
};
|
||||
|
||||
endLoadingScreen;
|
||||
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
|
||||
|
||||
//Wait for HIVE to be free
|
||||
waitUntil{!hiveInUse};
|
||||
hiveInUse = true;
|
||||
//Send request
|
||||
_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
|
||||
_primary = [_key,true] call fnc_motherrequest;
|
||||
//Release HIVE
|
||||
hiveInUse = false;
|
||||
|
||||
//Process request
|
||||
_isNew = count _primary < 4; //_result select 1;
|
||||
_charID = _primary select 2;
|
||||
_randomSpot = false;
|
||||
|
||||
diag_log ("LOGIN OBJ: " + str(_playerObj) + " Type: " + (typeOf _playerObj) + " ID: " + str(_charID));
|
||||
|
||||
/* PROCESS */
|
||||
|
||||
if (!_isNew) then {
|
||||
//RETURNING CHARACTER
|
||||
_inventory = _primary select 4;
|
||||
_backpack = _primary select 5;
|
||||
_survival = _primary select 6;
|
||||
_model = _primary select 7;
|
||||
} else {
|
||||
_model = _primary select 3;
|
||||
//Record initial inventory
|
||||
_config = (configFile >> "CfgSurvival" >> "Inventory" >> "Default");
|
||||
_mags = getArray (_config >> "magazines");
|
||||
_wpns = getArray (_config >> "weapons");
|
||||
_bcpk = getText (_config >> "backpack");
|
||||
_randomSpot = true;
|
||||
|
||||
//Wait for HIVE to be free
|
||||
waitUntil{!hiveInUse};
|
||||
hiveInUse = true;
|
||||
//Send request
|
||||
_key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
|
||||
_result = [_key,false] call fnc_motherrequest;
|
||||
//Release HIVE
|
||||
hiveInUse = false;
|
||||
};
|
||||
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
|
||||
//Server publishes variable to clients and WAITS
|
||||
_playerObj setVariable ["publish",[_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model],true];
|
||||
Reference in New Issue
Block a user