mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
sync with DayZ 1.7.4 CE
This commit is contained in:
@@ -34,7 +34,7 @@ player reveal _object;
|
||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||
|
||||
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
|
||||
publicVariable "dayzPublishObj";
|
||||
publicVariableServer "dayzPublishObj";
|
||||
if (isServer) then {
|
||||
dayzPublishObj call server_publishObj;
|
||||
};
|
||||
|
||||
@@ -8,6 +8,8 @@ _activatingPlayer = _this select 1;
|
||||
_trader_id = (_this select 3) select 0;
|
||||
_category = (_this select 3) select 1;
|
||||
|
||||
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
||||
|
||||
dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action];
|
||||
publicVariable "dayzTraderMenu";
|
||||
if (isServer) then {
|
||||
@@ -16,28 +18,29 @@ if (isServer) then {
|
||||
|
||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
|
||||
//diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
{
|
||||
_id = parseNumber (_x select 0);
|
||||
_type = _x select 1;
|
||||
_loc = _x select 2;
|
||||
_name = _x select 3;
|
||||
_qty = parseNumber (_x select 4);
|
||||
_cost = parseNumber (_x select 5);
|
||||
_sell = parseNumber (_x select 6);
|
||||
_cur = _x select 7;
|
||||
_cat = _x select 8;
|
||||
_order = parseNumber (_x select 9);
|
||||
_tid = parseNumber (_x select 10);
|
||||
_currency = _x select 11;
|
||||
_actionFile = _x select 12;
|
||||
_header = _x select 0; // "TRD"
|
||||
_btype = _x select 1;
|
||||
_stype = _x select 2;
|
||||
_loc = _x select 3;
|
||||
_name = _x select 4;
|
||||
_qty = _x select 5;
|
||||
_cost = _x select 6;
|
||||
_bcurrency = _x select 7;
|
||||
_sell = _x select 8;
|
||||
_scurrency = _x select 9;
|
||||
_cat = _x select 10;
|
||||
_order = _x select 11;
|
||||
_tid = _x select 12;
|
||||
_actionFile = _x select 13;
|
||||
|
||||
_textPart = getText(configFile >> _type >> _name >> "displayName");
|
||||
_textPart = getText(configFile >> _btype >> _name >> "displayName");
|
||||
|
||||
_File = "\z\addons\dayz_code\actions\" + _actionFile + ".sqf";
|
||||
|
||||
_part_out = _name;
|
||||
_part_in = _currency;
|
||||
_part_in = _bcurrency;
|
||||
_out = 1;
|
||||
_in = _cost;
|
||||
|
||||
@@ -47,13 +50,13 @@ waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
|
||||
// trade_items.sqf | [part_out, part_in, qty_out, qty_in,];
|
||||
_part = player addAction [_Display, _File,[_part_out,_part_in,_out,_in], _order, true, true, "",""];
|
||||
//diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_metals set [count s_player_metals,_part];
|
||||
diag_log format["DEBUG TRADER: %1", _part];
|
||||
s_player_parts set [count s_player_parts,_part];
|
||||
|
||||
} forEach dayzTraderMenuResult;
|
||||
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 92, true, false, "",""];
|
||||
s_player_metals set [count s_player_metals,_cancel];
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 10, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
// Clear Data maybe consider cacheing results
|
||||
dayzTraderMenuResult = nil;
|
||||
|
||||
@@ -9,5 +9,7 @@ if(_whistle) then {
|
||||
|
||||
sleep 1;
|
||||
|
||||
if (_dog distance player <= 900) then {
|
||||
_handle setFSMVariable ["_command","return"];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private["_object"];
|
||||
|
||||
dayzUpdateVehicle = [_this select 3,"all"];
|
||||
publicVariable "dayzUpdateVehicle";
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
if (isServer) then {
|
||||
dayzUpdateVehicle call server_updateObject;
|
||||
};
|
||||
30
dayz_code/actions/player_SplitBars.sqf
Normal file
30
dayz_code/actions/player_SplitBars.sqf
Normal file
@@ -0,0 +1,30 @@
|
||||
private["_item"];
|
||||
_item = _this;
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
|
||||
_consume = getArray (_config >> "ItemActions" >> "SplitBar" >> "use");
|
||||
_create = getArray (_config >> "ItemActions" >> "SplitBar" >> "output");
|
||||
|
||||
_textConsume = getText(configFile >> "CfgMagazines" >> (_consume select 0) >> "displayName");
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> (_create select 0) >> "displayName");
|
||||
|
||||
_amountNeed = count _consume;
|
||||
_amountHas = {_x == (_consume select 0)} count magazines player;
|
||||
_amountMake = count _create;
|
||||
|
||||
_hasInput = (_amountNeed <= _amountHas);
|
||||
player playActionNow "PutDown";
|
||||
if (_hasInput) then {
|
||||
//Take Items
|
||||
{
|
||||
player removeMagazine _x;
|
||||
} forEach _consume;
|
||||
sleep 1;
|
||||
//Give Items
|
||||
{
|
||||
player addMagazine _x;
|
||||
} forEach _create;
|
||||
cutText [format[("You have successfully converted %1 %2."),_amountMake,_textCreate], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("You cannot convert that combination, you need %1 %2."),_amountNeed,_textConsume], "PLAIN DOWN"];
|
||||
};
|
||||
@@ -34,7 +34,7 @@ player reveal _object;
|
||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||
|
||||
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
|
||||
publicVariable "dayzPublishObj";
|
||||
publicVariableServer "dayzPublishObj";
|
||||
if (isServer) then {
|
||||
dayzPublishObj call server_publishObj;
|
||||
};
|
||||
|
||||
30
dayz_code/actions/player_convertBars.sqf
Normal file
30
dayz_code/actions/player_convertBars.sqf
Normal file
@@ -0,0 +1,30 @@
|
||||
private["_item"];
|
||||
_item = _this;
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
|
||||
_consume = getArray (_config >> "ItemActions" >> "ReloadMag" >> "use");
|
||||
_create = getArray (_config >> "ItemActions" >> "ReloadMag" >> "output");
|
||||
|
||||
_textConsume = getText(configFile >> "CfgMagazines" >> (_consume select 0) >> "displayName");
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> (_create select 0) >> "displayName");
|
||||
|
||||
_amountNeed = count _consume;
|
||||
_amountHas = {_x == (_consume select 0)} count magazines player;
|
||||
_amountMake = count _create;
|
||||
|
||||
_hasInput = (_amountNeed <= _amountHas);
|
||||
player playActionNow "PutDown";
|
||||
if (_hasInput) then {
|
||||
//Take Items
|
||||
{
|
||||
player removeMagazine _x;
|
||||
} forEach _consume;
|
||||
sleep 1;
|
||||
//Give Items
|
||||
{
|
||||
player addMagazine _x;
|
||||
} forEach _create;
|
||||
cutText [format[("You have successfully converted %1 %2."),_amountMake,_textCreate], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("You cannot convert that combination, you need %1 %2."),_amountNeed,_textConsume], "PLAIN DOWN"];
|
||||
};
|
||||
@@ -35,7 +35,7 @@ _update set [3,true];
|
||||
player setVariable["updatePlayer",_update,true];
|
||||
*/
|
||||
dayzPlayerSave = player;
|
||||
publicVariable "dayzPlayerSave";
|
||||
publicVariableServer "dayzPlayerSave";
|
||||
if (isServer) then {
|
||||
dayzPlayerSave call server_updatePlayer;
|
||||
};
|
||||
|
||||
@@ -1,73 +1,70 @@
|
||||
private["_item","_isFemale","_itemNew","_item","_onLadder"];
|
||||
/*
|
||||
_item spawn player_wearClothes;
|
||||
TODO: female
|
||||
*/
|
||||
private["_item","_isFemale","_itemNew","_item","_onLadder","_model","_hasclothesitem","_config","_text"];
|
||||
_item = _this;
|
||||
call gear_ui_init;
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
|
||||
|
||||
_hasclothesitem = _this in magazines player;
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _item;
|
||||
_text = getText (_config >> "displayName");
|
||||
_config = configFile >> "CfgMagazines";
|
||||
_text = getText (_config >> _item >> "displayName");
|
||||
|
||||
if (!_hasclothesitem) exitWith {cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]};
|
||||
|
||||
if (vehicle player != player) exitWith {cutText ["You may not change clothes while in a vehicle", "PLAIN DOWN"]};
|
||||
|
||||
_isFemale = ((typeOf player == "SurvivorW2_DZ")||(typeOf player == "BanditW1_DZ"));
|
||||
if (_isFemale) then {
|
||||
if (_item != "Skin_Survivor2_DZ") exitWith {cutText ["Currently Female Characters cannot change to this skin. This will change in a future update.", "PLAIN DOWN"]};
|
||||
};
|
||||
if (_isFemale) exitWith {cutText ["Currently Female Characters cannot change to this skin. This will change in a future update.", "PLAIN DOWN"]};
|
||||
|
||||
private["_itemNew","_myModel","_humanity","_isBandit","_isHero"];
|
||||
_myModel = (typeOf player);
|
||||
_itemNew = "Skin_Survivor2_DZ";
|
||||
|
||||
player removeMagazine _item;
|
||||
_humanity = player getVariable ["humanity",0];
|
||||
_isBandit = _humanity < -2000;
|
||||
_isHero = _humanity > 5000;
|
||||
_itemNew = "Skin_" + _myModel;
|
||||
|
||||
if ( !(isClass(_config >> _itemNew)) ) then {
|
||||
_itemNew = if (!_isFemale) then {"Skin_Survivor2_DZ"} else {"Skin_SurvivorW2_DZ"};
|
||||
};
|
||||
|
||||
switch (_item) do {
|
||||
case "Skin_Sniper1_DZ": {
|
||||
_itemNew = "Skin_" + _myModel;
|
||||
[dayz_playerUID,dayz_characterID,"Sniper1_DZ"] spawn player_humanityMorph;
|
||||
_model = "Sniper1_DZ";
|
||||
};
|
||||
case "Skin_Camo1_DZ": {
|
||||
_itemNew = "Skin_" + _myModel;
|
||||
[dayz_playerUID,dayz_characterID,"Camo1_DZ"] spawn player_humanityMorph;
|
||||
_model = "Camo1_DZ";
|
||||
};
|
||||
case "Skin_Rocket_DZ": {
|
||||
_itemNew = "Skin_" + _myModel;
|
||||
[dayz_playerUID,dayz_characterID,"Rocket_DZ"] spawn player_humanityMorph;
|
||||
_model = "Rocket_DZ";
|
||||
};
|
||||
case "Skin_Soldier1_DZ": {
|
||||
_model = "Soldier1_DZ";
|
||||
};
|
||||
case "Skin_Survivor2_DZ": {
|
||||
_model = "Survivor2_DZ";
|
||||
if (_isFemale) then {
|
||||
_model = "SurvivorW2_DZ";
|
||||
};
|
||||
if (_humanity < -2000) then {
|
||||
if (_isBandit) then {
|
||||
_model = "Bandit1_DZ";
|
||||
if (_isFemale) then {
|
||||
_model = "BanditW1_DZ";
|
||||
};
|
||||
};
|
||||
if (_humanity > 5000) then {
|
||||
if (_isHero) then {
|
||||
_model = "Survivor3_DZ";
|
||||
if (_isFemale) then {
|
||||
_model = "SurvivorW2_DZ";
|
||||
};
|
||||
};
|
||||
if (_model != _myModel) then {
|
||||
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
|
||||
};
|
||||
};
|
||||
case "Skin_Soldier1_DZ": {
|
||||
_itemNew = "Skin_" + _myModel;
|
||||
[dayz_playerUID,dayz_characterID,"Soldier1_DZ"] spawn player_humanityMorph;
|
||||
};
|
||||
};
|
||||
|
||||
_config = configFile >> "CfgMagazines" >> _itemNew;
|
||||
_isClass = isClass (_config);
|
||||
|
||||
if (_isClass) then {
|
||||
if (_model != _myModel) then {
|
||||
player removeMagazine _item;
|
||||
player addMagazine _itemNew;
|
||||
};
|
||||
player setVariable ["humanity",_humanity,true];
|
||||
[dayz_playerUID,dayz_characterID,_model] spawn player_humanityMorph;
|
||||
};
|
||||
@@ -14,7 +14,7 @@ _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
sleep 5;
|
||||
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariable "dayzDeleteObj";
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call local_deleteObj;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"];
|
||||
private["_activatingPlayer","_trader_id","_category","_action","_id","_btype","_stype","_loc","_name","_qty","_cost","_qty","_sell","_order","_tid","_bcurrency","_scurrency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
|
||||
@@ -8,7 +8,7 @@ _activatingPlayer = _this select 1;
|
||||
_trader_id = (_this select 3) select 0;
|
||||
_category = (_this select 3) select 1;
|
||||
|
||||
diag_log format["DEBUG TRADER OBJ: %1", _trader];
|
||||
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
||||
|
||||
dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action];
|
||||
publicVariable "dayzTraderMenu";
|
||||
@@ -18,27 +18,28 @@ if (isServer) then {
|
||||
|
||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
|
||||
//diag_log format["DEBUG Sell: %1", dayzTraderMenuResult];
|
||||
diag_log format["DEBUG Sell: %1", dayzTraderMenuResult];
|
||||
{
|
||||
_id = parseNumber (_x select 0);
|
||||
_type = _x select 1;
|
||||
_loc = _x select 2;
|
||||
_name = _x select 3;
|
||||
_qty = parseNumber (_x select 4);
|
||||
_cost = parseNumber (_x select 5);
|
||||
_sell = parseNumber (_x select 6);
|
||||
_cur = _x select 7;
|
||||
_cat = _x select 8;
|
||||
_order = parseNumber (_x select 9);
|
||||
_tid = parseNumber (_x select 10);
|
||||
_currency = _x select 11;
|
||||
_actionFile = _x select 12;
|
||||
_header = _x select 0; // "TRD"
|
||||
_btype = _x select 1;
|
||||
_stype = _x select 2;
|
||||
_loc = _x select 3;
|
||||
_name = _x select 4;
|
||||
_qty = _x select 5;
|
||||
_cost = _x select 6;
|
||||
_bcurrency = _x select 7;
|
||||
_sell = _x select 8;
|
||||
_scurrency = _x select 9;
|
||||
_cat = _x select 10;
|
||||
_order = _x select 11;
|
||||
_tid = _x select 12;
|
||||
_actionFile = _x select 13;
|
||||
|
||||
_textPart = getText(configFile >> _type >> _name >> "displayName");
|
||||
_textPart = getText(configFile >> _stype >> _name >> "displayName");
|
||||
|
||||
_File = "\z\addons\dayz_code\actions\" + _actionFile + ".sqf";
|
||||
|
||||
_part_out = _cur;
|
||||
_part_out = _scurrency;
|
||||
_part_in = _name;
|
||||
_out = _sell;
|
||||
_in = 1;
|
||||
@@ -54,7 +55,7 @@ waitUntil {!isNil "dayzTraderMenuResult"};
|
||||
|
||||
} forEach dayzTraderMenuResult;
|
||||
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 99, true, false, "",""];
|
||||
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["medical"], 10, true, false, "",""];
|
||||
s_player_parts set [count s_player_parts,_cancel];
|
||||
|
||||
dayzTraderMenuResult = nil;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
private["_sellgeneric1"];
|
||||
private["none"];
|
||||
|
||||
{player removeAction _x} forEach s_player_tradecans;s_player_tradecans = [];
|
||||
{player removeAction _x} forEach s_player_metals;s_player_metals = [];
|
||||
{player removeAction _x} forEach s_player_bank;s_player_bank = [];
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
//{player removeAction _x} forEach s_player_bank;s_player_bank = [];
|
||||
|
||||
s_player_tradecans_crtl = -1;
|
||||
s_player_metal_crtl = -1;
|
||||
s_player_bank_crtl = -1;
|
||||
s_player_parts_crtl = -1;
|
||||
//s_player_bank_crtl = -1;
|
||||
@@ -194,6 +194,88 @@ class CfgVehicles {
|
||||
gunnerCanSee = 2+16+32;
|
||||
driverCanSee = 2+16+32;
|
||||
};
|
||||
//HMMWV_Ambulance_CZ_DES_EP1
|
||||
class HMMWV_Ambulance;
|
||||
class HMMWV_Ambulance_DZ: HMMWV_Ambulance
|
||||
{
|
||||
radartype = 0;
|
||||
displayName = "HMMWV_Ambulance_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
};
|
||||
//Mi17_Civilian
|
||||
class Mi17_Civilian;
|
||||
class Mi17_DZ: Mi17_Civilian
|
||||
{
|
||||
radartype = 0;
|
||||
displayName = "Mi17_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
};
|
||||
//An2_TK_EP1
|
||||
class An2_TK_EP1;
|
||||
class AN2_DZ: An2_TK_EP1 {
|
||||
radartype = 0;
|
||||
displayName = "AN2_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
};
|
||||
//UH60M_MEV_EP1
|
||||
class UH60M_MEV_EP1;
|
||||
class UH60M_DZ: UH60M_MEV_EP1 {
|
||||
radartype = 0;
|
||||
displayName = "UH60M_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
};
|
||||
//AH6X_EP1
|
||||
class AH6X_EP1;
|
||||
class AH6X_DZ: AH6X_EP1 {
|
||||
radartype = 0;
|
||||
displayName = "AH6X_DZ";
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerHasFlares = false;
|
||||
};
|
||||
class House {
|
||||
class DestructionEffects;
|
||||
};
|
||||
|
||||
@@ -15,11 +15,6 @@ _total = _damage;
|
||||
//diag_log ("DAMAGE VEH: " + typeof(_unit) + " / " + str(_hit) + " / " + str(_damage) + " / " + str(getDammage _unit));
|
||||
|
||||
if (local _unit) then {
|
||||
if (_ammo == "zombie") then {
|
||||
//_unit setDamage (_damage / 2);
|
||||
_total = [_unit,_hit,_damage] call object_setFixServer;
|
||||
} else {
|
||||
_total = [_unit,_hit,_damage] call object_setHitServer;
|
||||
};
|
||||
};
|
||||
_total
|
||||
@@ -228,7 +228,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
s_player_repairActions set [count s_player_repairActions,_handle];
|
||||
} else {
|
||||
_color = "color='#70bf44'"; //green
|
||||
_string = format["<t %2>Remove%1</t>",_cmpt,_color]; //Remove - Part
|
||||
_string = format["<t %2>Take%1</t>",_cmpt,_color]; //Take - Part
|
||||
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
|
||||
s_player_repairActions set [count s_player_repairActions,_handle];
|
||||
};
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
private["_list","_Pos","_randrefpoint","_PosList","_PosSelect","_Pos","_list","_animalssupported","_type","_root","_favouritezones"];
|
||||
|
||||
private["_list","_Pos","_randrefpoint","_PosList","_PosSelect","_Pos","_list","_animalssupported","_type","_root","_favouritezones","_GroupMarker","_agent","_id","_tame"];
|
||||
_list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance];
|
||||
|
||||
if (count _list < dayz_maxAnimals) then {
|
||||
//Find where animal likes
|
||||
_animalssupported = ["hen","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","Fin", "Pastor"];
|
||||
_animalssupported = ["hen","Cow","Sheep","WildBoar","WildBoar","WildBoar","Goat","Rabbit","Rabbit","DZ_Fin","DZ_Pastor"];
|
||||
//_animalssupported = ["DZ_Fin","DZ_Pastor"];
|
||||
_type = (_animalssupported select floor(random(count _animalssupported)));
|
||||
if (_type == "Cow") then {
|
||||
_animalssupported = ["Cow01","Cow02","Cow03","Cow04"];
|
||||
@@ -32,9 +34,9 @@ if (count _list < dayz_maxAnimals) then {
|
||||
_agent = createAgent [_type, _Pos, [], 0, "FORM"];
|
||||
_agent setpos _Pos;
|
||||
_id = [_pos,_agent] execFSM "\z\addons\dayz_code\system\animal_agent.fsm";
|
||||
if (_type == "Fin" || _type == "Pastor") then {
|
||||
if ((_type == "DZ_Fin") || (_type == "DZ_Pastor")) then {
|
||||
_tame = _agent addAction ["Tame Dog", "\z\addons\dayz_code\compile\player_tameDog.sqf"];
|
||||
};
|
||||
};
|
||||
sleep 1;
|
||||
};z
|
||||
};
|
||||
@@ -24,6 +24,8 @@ player setVariable ["NORRN_unconscious", false, true];
|
||||
player setVariable ["unconsciousTime", 0, true];
|
||||
player setVariable ["USEC_isCardiac",false,true];
|
||||
player setVariable ["medForceUpdate",true,true];
|
||||
//remove combat timer on death
|
||||
player setVariable ["startcombattimer", 0, true];
|
||||
r_player_unconscious = false;
|
||||
r_player_cardiac = false;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ private ["_objects"];
|
||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
|
||||
{
|
||||
dayzUpdateVehicle = [_x,"all"];
|
||||
publicVariable "dayzUpdateVehicle";
|
||||
publicVariableServer "dayzUpdateVehicle";
|
||||
} foreach _objects;
|
||||
|
||||
private ["_backpackWpnQtys","_backpackWpnTypes","_backpackWpn","_backpackMag","_countr"];
|
||||
|
||||
@@ -83,9 +83,6 @@ call dayz_resetSelfActions;
|
||||
|
||||
eh_player_killed = player addeventhandler ["FiredNear",{_this call player_weaponFiredNear;} ];
|
||||
|
||||
//Combat logging
|
||||
_eh_combat_projectilenear = player addEventHandler ["IncomingFire",{_this call player_projectileNear;} ];
|
||||
//
|
||||
[player] call fnc_usec_damageHandle;
|
||||
player allowDamage true;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ if(_ownerID == dayz_characterID) then {
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariable "dayzDeleteObj";
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call local_deleteObj;
|
||||
};
|
||||
|
||||
@@ -1,30 +1,51 @@
|
||||
private["_unit","_shooter","_distance","_ammo","_position","_isInCombat"];
|
||||
_unit = _this select 0;
|
||||
_shooter = _this select 1;
|
||||
_ammo = _this select 2;
|
||||
_distance = _this select 3;
|
||||
_position = _this select 4;
|
||||
private["_unit","_projectile","_isInCombat"];
|
||||
_unit = _this select 0;
|
||||
_projectile = _this select 6;
|
||||
|
||||
_isInComat = _unit getVariable["startcombattimer",0];
|
||||
_endPos = getPosATL _projectile;
|
||||
diag_log ("0");
|
||||
|
||||
_listNear = _unit nearEntities [["CAManBase","AllVehicles"],25];
|
||||
_isInComat = _unit getVariable["startcombattimer",0];
|
||||
|
||||
diag_log ("Bullit Speed: " +str(Speed _projectile));
|
||||
diag_log ("Bullit Velocity: " +str(velocity _projectile));
|
||||
|
||||
_listNear = [];
|
||||
_callCount = 0;
|
||||
|
||||
//approx 1020 meters
|
||||
while {(alive _projectile) && !(isNull _projectile) && _callCount < 85;} do {
|
||||
_projectilespeed = Speed _projectile;
|
||||
_projectflight = (((_projectilespeed / 60) * 1000));
|
||||
if (_projectflight > 0) then {
|
||||
sleep (12 / (_projectflight));
|
||||
};
|
||||
if (alive _projectile && !(isNull _projectile)) then {_currentNear = (Position _projectile) nearEntities [["CAManBase","AllVehicles"],15];};
|
||||
_listNear = _listNear + _currentNear;
|
||||
_callCount = _callCount + 1;
|
||||
};
|
||||
diag_log ("2");
|
||||
{
|
||||
_nearVehicle = _x;
|
||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||
|
||||
if ((alive _unit) and (isPlayer _unit) and _isInCombat == 0) then {
|
||||
_unit setVariable["startcombattimer", 1, true];
|
||||
diag_log("Now in Combat (Player): " + name _unit);
|
||||
_listNear = _listNear - [_x];
|
||||
|
||||
diag_log ("3");
|
||||
|
||||
if (isPlayer _nearVehicle) then {
|
||||
_isInCombat = _nearVehicle getVariable["startcombattimer",0];
|
||||
if ((alive _nearVehicle) and _isInCombat == 0) then {
|
||||
_nearVehicle setVariable["startcombattimer", 1, true];
|
||||
diag_log("Now in Combat (Player): " + name _unit);
|
||||
};
|
||||
};
|
||||
|
||||
if (_nearVehicle isKindOf "AllVehicles") then {
|
||||
{
|
||||
_isInCombat = _x getVariable["startcombattimer",0];
|
||||
if (isPlayer _x and _isInCombat == 0) then {
|
||||
if (isPlayer _x and _isInCombat == 0 and alive _x) then {
|
||||
_x setVariable["startcombattimer", 1, true];
|
||||
diag_log("Now in Combat (Crew): " + name _x);
|
||||
};
|
||||
} forEach (crew _nearVehicle);
|
||||
};
|
||||
} forEach _listNear;
|
||||
|
||||
} forEach _listNear;
|
||||
|
||||
@@ -61,7 +61,7 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
if (count _muzzles > 1) then {
|
||||
_currentWpn = currentMuzzle player;
|
||||
};
|
||||
|
||||
|
||||
//Debug Message
|
||||
diag_log "Attempting to switch model";
|
||||
diag_log str(_weapons);
|
||||
@@ -162,7 +162,7 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
//Debug Message
|
||||
diag_log "Swichtable Unit Created. Equipment:";
|
||||
diag_log str(weapons _newUnit);
|
||||
diag_log str(magazines _newUnit);
|
||||
diag_log str(magazines _newUnit);
|
||||
diag_log str(getWeaponCargo unitBackpack _newUnit);
|
||||
diag_log str(getMagazineCargo unitBackpack _newUnit);
|
||||
|
||||
@@ -175,17 +175,10 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
||||
removeAllWeapons _oldUnit;
|
||||
{_oldUnit removeMagazine _x;} forEach magazines _oldUnit;
|
||||
|
||||
if (!isNull dayz_originalPlayer) then {
|
||||
dayz_originalPlayer = _oldUnit;
|
||||
_oldUnit addEventHandler ["HandleDamage",{false}];
|
||||
_oldUnit disableAI "ANIM";
|
||||
_oldUnit disableAI "MOVE";
|
||||
} else {
|
||||
deleteVehicle _oldUnit;
|
||||
};
|
||||
deleteVehicle _oldUnit;
|
||||
|
||||
//Move player inside
|
||||
|
||||
|
||||
// player switchCamera = _currentCamera;
|
||||
if(_currentWpn != "") then {_newUnit selectWeapon _currentWpn;};
|
||||
[objNull, player, rSwitchMove,_currentAnim] call RE;
|
||||
|
||||
@@ -4,12 +4,20 @@ _caller = _this select 1;
|
||||
_id = _this select 2;
|
||||
_params = _this select 3;
|
||||
_pos = position _target;
|
||||
_hasRawMeat = "FoodSteakRaw" in magazines player;
|
||||
_hasdog = player getVariable ["dogid", "false"];
|
||||
|
||||
deleteVehicle (_this select 0);
|
||||
_dog = (group player) createUnit [format["DZ_%1", typeOf _target], _pos, [], 0, "FORM"];
|
||||
_dog disableAI "FSM";
|
||||
_fsmid = [_dog, (count units group _caller)] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
_target removeAction _id;
|
||||
if ((_hasRawMeat) && (_hasdog == "false")) then {
|
||||
player removeMagazine "FoodSteakRaw";
|
||||
deleteVehicle (_this select 0);
|
||||
_dog = (group player) createUnit [typeOf _target, _pos, [], 0, "FORM"];
|
||||
player setvariable ["dogid", _fsmid];
|
||||
_dog disableAI "FSM";
|
||||
_fsmid = [_dog, typeOf _target] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
|
||||
_fsmid setFSMVariable ["_handle", _fsmid];
|
||||
_target removeAction _id;
|
||||
} else {
|
||||
cutText ["You must have RawMeat", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
//handle publicVariables here later.
|
||||
|
||||
@@ -21,12 +21,10 @@ private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","
|
||||
|
||||
// Both the firer and those nearby (<=15m) go into "combat" to prevent ALT-F4
|
||||
_firer setVariable["startcombattimer", 1, true];
|
||||
_listNear = _firer nearEntities [["CAManBase","AllVehicles"],15];
|
||||
{
|
||||
if (_isPlayer) then {
|
||||
|
||||
if (_distance <= 15) then {
|
||||
_unit setVariable["startcombattimer", 1, true];
|
||||
};
|
||||
} forEach _listNear;
|
||||
|
||||
if (_inVehicle) exitWith{};
|
||||
if (_firer == player) exitWith{};
|
||||
|
||||
@@ -357,7 +357,7 @@ class CfgBuildingLoot {
|
||||
{ "BAF_AS50_scoped","weapon" },
|
||||
{ "Mk_48_DZ","weapon" },
|
||||
{ "M249_DZ","weapon" },
|
||||
{ "BAF_L85A2_RIS_CWS","weapon" },
|
||||
//{"BAF_L85A2_RIS_CWS","weapon"},
|
||||
{ "DMR","weapon" },
|
||||
{ "","military" },
|
||||
{ "","medical" },
|
||||
@@ -379,7 +379,7 @@ class CfgBuildingLoot {
|
||||
0.02, //{"BAF_AS50_scoped","weapon"},
|
||||
0.03, //{"Mk_48_DZ","weapon"},
|
||||
0.05, //{"M249_DZ","weapon"},
|
||||
0.01, //{"BAF_L85A2_RIS_CWS","weapon"},
|
||||
//0.01, //{"BAF_L85A2_RIS_CWS","weapon"},
|
||||
0.10, //{"DMR","weapon"},
|
||||
1, //{"","military"},
|
||||
0.5, //{"","medical"},
|
||||
|
||||
@@ -64,6 +64,8 @@ if (!isDedicated) then {
|
||||
//actions
|
||||
player_countmagazines = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_countmagazines.sqf";
|
||||
player_addToolbelt = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_addToolbelt.sqf";
|
||||
player_convertBars = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_convertBars.sqf";
|
||||
player_SplitBars = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_SplitBars.sqf";
|
||||
player_reloadMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_reloadMags.sqf";
|
||||
player_tentPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\tent_pitch.sqf";
|
||||
player_drink = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_drink.sqf";
|
||||
|
||||
@@ -27,6 +27,8 @@ if (isServer) then {
|
||||
"dayzDiscoRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
|
||||
"dayzPlayerSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync;};
|
||||
"dayzPublishObj" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
|
||||
// "dayzPublishBank" addPublicVariableEventHandler {(_this select 1) call server_publishBank};
|
||||
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) call server_traders};
|
||||
"dayzUpdateVehicle" addPublicVariableEventHandler {_id = (_this select 1) spawn server_updateObject};
|
||||
"dayzDeleteObj" addPublicVariableEventHandler {_id = (_this select 1) spawn local_deleteObj};
|
||||
"dayzLogin" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerLogin};
|
||||
|
||||
@@ -171,6 +171,9 @@ dayzHit = [];
|
||||
dayzPublishObj = []; //used for eventhandler to spawn a mirror of players tent
|
||||
dayzHideBody = objNull;
|
||||
|
||||
// dayzPublishBank = [];
|
||||
dayzTraderMenu = [];
|
||||
|
||||
//DayZ settings
|
||||
dayz_dawn = 6;
|
||||
dayz_dusk = 18;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,9 +34,9 @@ item29[] = {"Load_In",2,250,-75.000000,850.000000,25.000000,900.000000,0.000000,
|
||||
item30[] = {"Bad_Version",4,218,50.000000,650.000000,150.000000,700.000000,0.000000,"Bad" \n "Version"};
|
||||
item31[] = {"ERROR__Bad_Versi",2,250,175.000000,650.000000,275.000000,700.000000,0.000000,"ERROR:" \n "Bad Version"};
|
||||
item32[] = {"Display_Ready",4,218,-175.000000,900.000000,-75.000000,950.000000,0.000000,"Display" \n "Ready"};
|
||||
item33[] = {"Preload_Display",2,250,-75.000000,950.000000,25.000000,1000.000000,0.000000,"Preload" \n "Display"};
|
||||
item33[] = {"Preload_Display",2,4346,-75.000000,950.000000,25.000000,1000.000000,0.000000,"Preload" \n "Display"};
|
||||
item34[] = {"Preload_Done",4,218,-175.000000,1000.000000,-75.000000,1050.000000,0.000000,"Preload" \n "Done"};
|
||||
item35[] = {"Initialize",2,4346,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"};
|
||||
item35[] = {"Initialize",2,250,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"};
|
||||
item36[] = {"Finish",1,250,-75.000000,1150.000000,25.000000,1200.000000,0.000000,"Finish"};
|
||||
item37[] = {"True",8,218,25.000000,1100.000000,125.000000,1150.000000,0.000000,"True"};
|
||||
item38[] = {"Too_Long",4,218,300.000000,150.000000,400.000000,200.000000,0.000000,"Too" \n "Long"};
|
||||
@@ -115,7 +115,7 @@ link57[] = {50,49};
|
||||
link58[] = {51,52};
|
||||
link59[] = {52,29};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,81,6316128,1,-440.765930,455.171539,1392.221191,828.390381,955,601,1};
|
||||
window[] = {2,-1,-1,-1,-1,824,44,1015,44,3,972};
|
||||
window[] = {2,-1,-1,-1,-1,934,154,1125,154,3,972};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
@@ -929,7 +929,7 @@ class FSM
|
||||
"player disableConversation true;" \n
|
||||
"" \n
|
||||
"eh_player_killed = player addeventhandler [""FiredNear"",{_this call player_weaponFiredNear;} ];" \n
|
||||
"_eh_combat_projectilenear = player addEventHandler [""IncomingFire"",{_this call player_projectileNear;}];" \n
|
||||
"//_eh_combat_projectilenear = player addEventHandler [""IncomingFire"",{_this call player_projectileNear;}];" \n
|
||||
"" \n
|
||||
"//Select Weapon" \n
|
||||
"// Desc: select default weapon & handle multiple muzzles" \n
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
z\addons\dayz_code
|
||||
@@ -19,6 +19,13 @@ if (_playerID == "") exitWith {
|
||||
diag_log ("SETUP INIT FAILED: Exiting, no player ID: " + str(_playerObj));
|
||||
};
|
||||
|
||||
private["_dummy"];
|
||||
_dummy = getPlayerUID _playerObj;
|
||||
if ( _playerID != _dummy ) then {
|
||||
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
|
||||
_playerID = _dummy;
|
||||
};
|
||||
|
||||
//Variables
|
||||
_worldspace = [];
|
||||
_survival = [0,0,0];
|
||||
@@ -244,22 +251,6 @@ _playerObj setVariable ["lastTime",time];
|
||||
|
||||
diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
|
||||
myObj = objNull;
|
||||
call compile format["myObj = player%1",_playerID];
|
||||
|
||||
if (!(isNull myObj)) then {
|
||||
if (alive myObj) then {
|
||||
deleteVehicle myObj;
|
||||
diag_log ("LOGIN DUPLICATE PLAYER: " + str(_playerObj) + " DELETED ORIGINAL");
|
||||
};
|
||||
};
|
||||
|
||||
//Record player for management
|
||||
myObj = _playerObj;
|
||||
call compile format["player%1 = myObj;",_playerID];
|
||||
//diag_log (format["player%1 = myObj",_playerID]);
|
||||
//dayz_players set [count dayz_players,_playerObj];
|
||||
|
||||
dayzLogin = null;
|
||||
dayzLogin2 = null;
|
||||
|
||||
|
||||
33
dayz_server/compile/server_publishBank.sqf
Normal file
33
dayz_server/compile/server_publishBank.sqf
Normal file
@@ -0,0 +1,33 @@
|
||||
private["_type","_mUID","_deposit","_key","_result","_outcome","_balance","_uid"];
|
||||
//[UID,_deposit,]
|
||||
_mUID = _this select 0;
|
||||
_deposit = _this select 1;
|
||||
_type = _this select 2;
|
||||
_player = _this select 3;
|
||||
|
||||
|
||||
//GET DB ID
|
||||
_key = format["CHILD:111:%1:%2:%3:",_mUID,_deposit,_type];
|
||||
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
|
||||
_result = [_key] call server_hiveReadWrite;
|
||||
|
||||
_outcome = _result select 0;
|
||||
|
||||
if (_outcome == "PASS") then {
|
||||
|
||||
_msg = _result select 1;
|
||||
_balance = _result select 2;
|
||||
|
||||
diag_log("BANK: Action msg:" + str(_msg) + " Balance:" + str(_player));
|
||||
|
||||
_clientID = owner _player;
|
||||
|
||||
dayzBankBalance = _balance;
|
||||
_clientID publicVariableClient "dayzBankBalance";
|
||||
|
||||
diag_log ("PUBLISH BANK: Deposit " + str(_clientID) + " with " + str(_deposit));
|
||||
|
||||
};
|
||||
|
||||
41
dayz_server/compile/server_traders.sqf
Normal file
41
dayz_server/compile/server_traders.sqf
Normal file
@@ -0,0 +1,41 @@
|
||||
private["_type","_location","_clientID","_character","_tent","_traderid","_id","_outcome","_retrader"];
|
||||
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
|
||||
_character = _this select 0;
|
||||
_traderid = _this select 1;
|
||||
|
||||
_retrader = [];
|
||||
|
||||
_clientID = owner _character;
|
||||
diag_log ("HIVE: Menu Request by ClientID: "+ str(_clientID));
|
||||
|
||||
_key = format["CHILD:399:%1:",_traderid];
|
||||
_data = "HiveEXT" callExtension _key;
|
||||
|
||||
diag_log "HIVE: Request sent";
|
||||
|
||||
//Process result
|
||||
_result = call compile format ["%1",_data];
|
||||
_status = _result select 0;
|
||||
|
||||
_myArray = [];
|
||||
if (_status == "ObjectStreamStart") then {
|
||||
_val = _result select 1;
|
||||
//Stream Objects
|
||||
diag_log ("HIVE: Commence Object Streaming...");
|
||||
for "_i" from 1 to _val do {
|
||||
_data = "HiveEXT" callExtension _key;
|
||||
_result = call compile format ["%1",_data];
|
||||
_status = _result select 0;
|
||||
if (_status == "TRD") then {
|
||||
_retrader set [count _retrader,_result];
|
||||
};
|
||||
//diag_log ("HIVE: Loop ");
|
||||
};
|
||||
//diag_log ("HIVE: Streamed " + str(_val) + " objects");
|
||||
};
|
||||
|
||||
|
||||
diag_log(_retrader);
|
||||
dayzTraderMenuResult = _retrader;
|
||||
_clientID publicVariableClient "dayzTraderMenuResult";
|
||||
_retrader
|
||||
@@ -12,6 +12,8 @@ server_updatePlayer = compile preprocessFileLineNumbers "\z\addons\dayz_server\
|
||||
server_playerStat = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerStat.sqf";
|
||||
server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf";
|
||||
server_publishVeh = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle.sqf"; // Custom to add vehicles
|
||||
server_publishBank = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishBank.sqf";
|
||||
server_traders = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_traders.sqf";
|
||||
local_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_publishObj.sqf"; //Creates the object in DB
|
||||
local_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_deleteObj.sqf"; //Creates the object in DB
|
||||
local_createObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_createObj.sqf"; //Creates the object in DB
|
||||
|
||||
@@ -49,15 +49,33 @@ diag_log "HIVE: Starting";
|
||||
_idKey = _x select 1;
|
||||
_type = _x select 2;
|
||||
_ownerID = _x select 3;
|
||||
_dir = (_x select 4) select 0;
|
||||
_pos = (_x select 4) select 1;
|
||||
|
||||
_worldspace = _x select 4;
|
||||
_dir = 0;
|
||||
_pos = [0,0,0];
|
||||
_wsDone = false;
|
||||
if (count _worldspace >= 2) then
|
||||
{
|
||||
_dir = _worldspace select 0;
|
||||
if (count (_worldspace select 1) == 3) then {
|
||||
_pos = _worldspace select 1;
|
||||
_wsDone = true;
|
||||
}
|
||||
};
|
||||
if (!_wsDone) then {
|
||||
if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
|
||||
_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
|
||||
if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
|
||||
diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
|
||||
};
|
||||
|
||||
_intentory= _x select 5;
|
||||
_hitPoints= _x select 6;
|
||||
_fuel = _x select 7;
|
||||
_damage = _x select 8;
|
||||
|
||||
if (_damage < 1) then {
|
||||
diag_log ("OBJ: " + str(_idKey) + _type);
|
||||
diag_log format["OBJ: %1 - %2", _idKey,_type];
|
||||
|
||||
//Create it
|
||||
_object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
|
||||
@@ -135,7 +153,7 @@ diag_log "HIVE: Starting";
|
||||
_position = ([(getPosATL _object),0,100,10,0,500,0] call BIS_fnc_findSafePos);
|
||||
_object setPosATL _position;
|
||||
};
|
||||
_id = _object spawn fnc_vehicleEventHandler;
|
||||
_object call fnc_vehicleEventHandler;
|
||||
_totalvehicles = _totalvehicles + 1;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user