1.7.5.D1202

This commit is contained in:
A Clark
2012-12-07 20:29:23 -06:00
parent 73f951f1cf
commit 5521090b9e
74 changed files with 1258 additions and 576 deletions

View File

@@ -1,6 +1,6 @@
private["_item","_config","_onLadder","_create","_isOk","_config2","_consume"];
_item = _this;
_config = configFile >> "CfgWeapons" >> _item;
_config = configFile >> "cfgWeapons" >> _item;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
@@ -13,11 +13,11 @@ call gear_ui_init;
//Add new item
_create = getArray (_config >> "ItemActions" >> "Toolbelt" >> "output") select 0;
_config2 = configFile >> "CfgWeapons" >> _create;
_config2 = configFile >> "cfgWeapons" >> _create;
//Remove magazines if needed
if (_item in ["MeleeHatchet","MeleeCrowbar"]) then {
_magType = ([] + getArray (configFile >> "CfgWeapons" >> _item >> "magazines")) select 0;
_magType = ([] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines")) select 0;
_meleeNum = ({_x == _magType} count magazines player);
for "_i" from 1 to _meleeNum do {
player removeMagazine _magType;

View File

@@ -9,7 +9,7 @@ disableUserInput true;
_dialog = findDisplay 106;
_created = false;
if ( isNull _dialog ) then {
startLoadingScreen [""];
//startLoadingScreen [""];
createGearDialog [player, "RscDisplayGear"];
_dialog = findDisplay 106;
_created = true;
@@ -48,7 +48,7 @@ for "_i" from 122 to 129 do
};
if ( _created ) then {
closeDialog 0;
endLoadingScreen;
//endLoadingScreen;
};
disableUserInput false;
dayz_Magazines=_magazineArray;

View File

@@ -1,4 +1,4 @@
private["_hasFood","_item","_text","_key"];
private["_onLadder","_item","_hasfoodmag","_config","_text","_regen","_update","_id","_display","_control","_bloodVal","_ctrlBlood"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;

View File

@@ -0,0 +1,22 @@
private["_object","_position"];
_object = _this select 3;
_position = [position _object,0,0,0,0,0,0,position player] call BIS_fnc_findSafePos;
//Standup
//player playMove "amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon";
//sleep 1;
//waitUntil { animationState player != "amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon"};
//Kneel Down
player playMove "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon";
waitUntil { animationState player != "amovpknlmstpslowwrfldnon_amovpercmstpsraswrfldnon"};
sleep 2;
_object setpos _position;
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
sleep 3;
//Other possibilities
//[_object,0, 0] call bis_fnc_setpitchbank;
//_object setpos [getpos _object select 0, getpos _object select 1, 0];

View File

@@ -1,4 +1,4 @@
private["_item"];
private["_item","_onLadder","_hasmeditem","_config","_text","_id"];
_item = _this;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
@@ -26,7 +26,7 @@ switch (_item) do {
};
case "ItemHeatPack": {
player removeMagazine "ItemHeatPack";
dayz_temperatur = (dayz_temperatur + 5) max dayz_temperaturmax;
dayz_temperatur = (dayz_temperatur + 5) min dayz_temperaturmax;
cutText [localize "str_player_27", "PLAIN DOWN"];
};
};

View File

@@ -2,7 +2,7 @@
_item spawn player_wearClothes;
TODO: female
*/
private["_item","_isFemale","_itemNew","_item","_onLadder","_model","_hasclothesitem","_config","_text"];
private["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_myModel","_humanity","_isBandit","_isHero","_itemNew","_model"];
_item = _this;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;

View File

@@ -1,4 +1,3 @@
private["_obj","_bag","_pos"];
hintSilent format["DEBUG: %1",_this];
_obj = _this select 3;
_obj spawn player_packTent;

View File

@@ -1,4 +1,4 @@
private["_hasFood","_item","_text","_qty"];
private["_playerPos","_canFill","_isPond","_isWell","_pondPos","_objectsWell","_onLadder","_hasbottleitem","_config","_item","_text","_objectsPond","_qty","_id"];
call gear_ui_init;

View File

@@ -141,13 +141,15 @@ class CfgLoot {
"ItemPainkiller",
"ItemMorphine",
"ItemEpinephrine",
"ItemAntibiotic",
"ItemHeatPack"
},
{
1,
0.8,
0.5,
0.5,
0.2,
0.3,
0.1
}
};
@@ -161,12 +163,12 @@ class CfgLoot {
"ItemAntibiotic"
},
{
0.43,
0.33,
0.17,
0.13,
0.09,
0.17,
0.02
0.12
}
};
military[] = {
@@ -176,6 +178,7 @@ class CfgLoot {
"ItemSodaCoke",
"ItemSodaPepsi",
"ItemBandage",
"ItemAntibiotic",
"ItemPainkiller",
"ItemMorphine",
"30Rnd_556x45_Stanag",
@@ -214,6 +217,7 @@ class CfgLoot {
0.01,
0.04,
0.04,
0.04,
0.01,
0.04,
0.04,

View File

@@ -320,7 +320,13 @@ class CfgVehicles {
driverCanSee = 2+16+32;
};
//AH6X_EP1
class AH6X_EP1{ scope = 0; };
class AH6X_EP1
{
scope = 0;
commanderCanSee = 2+16+32;
gunnerCanSee = 2+16+32;
driverCanSee = 2+16+32;
};
class AH6X_DZ: AH6X_EP1
{
displayName = "AH6X_DZ";

View File

@@ -1,21 +1,15 @@
private["_serial","_positions","_lootGroup","_iArray","_iItem","_iClass","_iPos","_item","_mags","_qty","_max","_tQty","_canType","_obj","_type","_nearBy","_allItems","_items","_itemType","_itemChance","_lootChance","_weights","_index"];
private["_obj","_type","_config","_positions","_lootChance","_itemType","_itemChance","_iPos2","_rnd","_nearBy","_weights","_index","_iArray","_item"];
_obj = _this select 0;
_fastRun = _this select 1;
_type = typeOf _obj;
_config = configFile >> "CfgBuildingLoot" >> _type;
_positions = [] + getArray (_config >> "lootPos");
//diag_log ("LOOTSPAWN: READ:" + str(_type));
_lootChance = getNumber (_config >> "lootChance");
_itemType = [] + getArray (_config >> "itemType");
//diag_log ("LOOTSPAWN: READ:" + str(_itemType));
_itemChance = [] + getArray (_config >> "itemChance");
//diag_log ("LOOTSPAWN: Type " + str(count _itemType) + " / Chance " + str(count _itemChance));
//diag_log ("I want to spawn loot...");
{
private["_iPos2"];
_iPos2 = _obj modelToWorld _x;
@@ -38,13 +32,10 @@ _itemChance = [] + getArray (_config >> "itemChance");
_iArray set [3,0];
_iArray call spawn_loot;
_iArray = [];
diag_log ("LOOTSPAWN");
//diag_log ("LOOTSPAWN");
};
_item setVariable ["created",(DateToNumber date),true];
};
if (!_fastRun) then {
sleep 0.1;
};
};
};
} forEach _positions;

View File

@@ -1,27 +1,21 @@
private["_serial","_positions","_min","_lootGroup","_iArray","_iItem","_iClass","_iPos","_item","_mags","_qty","_max","_tQty","_canType","_obj","_type","_nearBy","_clean","_unitTypes","_max","_isNoone","_config","_num","_originalPos","_zombieChance","_rnd","_fastRun"];
private["_obj","_type","_config","_canLoot","_originalPos","_unitTypes","_min","_max","_num","_clean","_positions","_zombieChance","_rnd","_iPos","_nearBy","_nearByPlayer"];
_obj = _this select 0;
_type = typeOf _obj;
_config = configFile >> "CfgBuildingLoot" >> _type;
_canLoot = isClass (_config);
_fastRun = _this select 1;
_originalPos = getPosATL _obj;
if (_canLoot) then {
//Get zombie class
_unitTypes = getArray (_config >> "zombieClass");
_min = getNumber (_config >> "maxRoaming");
_max = getNumber (_config >> "minRoaming");
//Walking Zombies
_num = round(random _max) max _min; // + round(_max / 3);
//diag_log ("Class: " + _type + " / Zombies: " + str(_unitTypes) + " / Walking: " + str(_num));
for "_i" from 1 to _num do
{
[_originalPos,true,_unitTypes] call zombie_generate;
if (!_fastRun) then {
sleep 0.1;
};
};
//Add Internal Zombies
_clean = {alive _x} count ((getPosATL _obj) nearEntities ["zZombie_Base",(sizeOf _type)]) == 0;
if (_clean) then {
@@ -39,9 +33,6 @@ if (_canLoot) then {
[_iPos,false,_unitTypes] call zombie_generate;
};
};
if (!_fastRun) then {
sleep 0.1;
};
} forEach _positions;
};
dayz_buildingMonitor set [count dayz_buildingMonitor,_obj];

View File

@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_damageHandler.sqf";
- Function
- [unit, selectionName, damage, source, projectile] call fnc_usec_damageHandler;
************************************************************/
private["_unit","_humanityHit","_myKills","_isBandit","_hit","_damage","_isPlayer","_unconscious","_wound","_isHit","_isInjured","_type","_hitPain","_inPain","_isDead","_isCardiac","_killerID","_evType","_recordable","_inVehicle","_isHeadHit","_isMinor","_scale","_canHitFree"];
private["_unit","_hit","_damage","_unconscious","_source","_ammo","_type","_isMinor","_isHeadHit","_inVehicle","_evType","_recordable","_isPlayer","_humanityHit","_myKills","_sourceZombie","_display","_control","_canHitFree","_isBandit","_id","_scale","_wound","_isHit","_rndPain","_rndInfection","_hitPain","_hitInfection","_isInjured","_lowBlood","_isCardiac"];
_unit = _this select 0;
_hit = _this select 1;
_damage = _this select 2;
@@ -47,9 +47,6 @@ if (_unit == player) then {
if (_hit == "") then {
if ((_source != player) and _isPlayer) then {
//Enable aggressor Actions
if (_source isKindOf "CAManBase") then {
_source setVariable["startcombattimer",1];
};
_canHitFree = player getVariable ["freeTarget",false];
_isBandit = (typeOf player) == "Bandit1_DZ";
if (!_canHitFree and !_isBandit) then {
@@ -108,11 +105,12 @@ if (_hit in USEC_MinorWounds) then {
};
};
/*
if (_unit == player) then {
player sideChat str(_damage);
//incombat
_unit setVariable["startcombattimer", 1, false];
};
*/
if (_damage > 0.1) then {
if (_unit == player) then {
//shake the cam, frighten them!
@@ -131,7 +129,7 @@ if (_damage > 0.4) then { //0.25
_isHit = _unit getVariable[_wound,false];
if (_unit == player) then {
_rndPain = (random 10);
_rndInfection = (random 1000);
_rndInfection = (random 500);
_hitPain = (_rndPain < _damage);
if ((_isHeadHit) or (_damage > 1.2 and _hitPain)) then {
_hitPain = true;

View File

@@ -1,59 +1,22 @@
/*
File: inString.sqf
Author: Mika Hannola
private["_findarray","_stringarray","_findcount","_stringcount","_found","_y","_i","_x"];
Description:
Find a string within a string.
Parameter(s):
_this select 0: BOOL - when true, displays all units, otherwise just player positions
_this select 0: <string> string to be found
_this select 1: <string> string to search from
_this select 2 (Optional): search is case sensitive (default: false)
Returns:
Boolean (true when string is found).
How to use:
BIS_fnc_inString = compile preprocessFile "inString.sqf"; //Compile the function
_found = ["string","String",true] call BIS_fnc_inString; //Find a string within a string
*/
private ["_casesensitive","_find","_string","_findarray","_stringarray","_findcount","_stringcount","_found","_match","_y","_i","_x"];
_find = _this select 0;
_string = _this select 1;
//modification : default _casesensitive is false
_casesensitive = false;
if(count(_this) > 2) then {_casesensitive = _this select 2;};
_findarray = toArray _find;
_stringarray = toArray _string;
_findarray = toArray (_this select 0);
_stringarray = toArray (_this select 1);
_findcount = count _findarray;
_stringcount = count _stringarray;
_found = false;
scopeName "main";
if (_findcount <= _stringcount and !_found) then
{
for "_y" from 0 to (_stringcount - _findcount) do
{
_match = [];
for "_i" from 0 to (_findcount - 1) do
{
_match set [count _match,_stringarray select (_y + _i)];
};
_found = true;
if (_findcount <= _stringcount) then {
for "_y" from 0 to (_stringcount - _findcount) do {
_i = 0;
{
if (_x != _match select _i) then
{
_found = false;
};
scopeName "loop1";
if (_x == (_stringarray select (_y + _i))) then {
_i = _i + 1;
} else {breakOut "loop1";};
} forEach _findarray;
if (_found) then {breakTo "main";};
if (_i == _findcount) then {_found = true; breakTo "main";};
};
};
_found;
_found

View File

@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
- Function
- [] call fnc_usec_selfActions;
************************************************************/
private["_menClose","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_vehicle","_inVehicle","_color","_part","_traderType"];
private["_vehicle","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_hasTent","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_allFixed","_hitpoints","_damage","_part","_cmpt","_color","_string","_handle","_trader_id","_category","_buy","_sell","_buy2","_sell2","_buy3","_sell3","_buy1","_sell1","_buy4","_sell4","_buy5","_sell5","_zparts1","_zparts2","_zparts3","_zparts4","_zparts5","_zparts6","_zparts7","_metals1","_metals2","_metals4","_metals3"];
_vehicle = vehicle player;
_inVehicle = (_vehicle != player);
@@ -45,6 +45,7 @@ if (_canPickLight and !dayz_hasLight) then {
if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4)) then { //Has some kind of target
_isHarvested = cursorTarget getVariable["meatHarvested",false];
_isVehicle = cursorTarget isKindOf "AllVehicles";
_isVehicletype = typeOf cursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"];
_isMan = cursorTarget isKindOf "Man";
_traderType = typeOf cursorTarget;
_ownerID = cursorTarget getVariable ["characterID","0"];
@@ -54,6 +55,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_isTent = cursorTarget isKindOf "TentStorage";
_isFuel = false;
_isAlive = alive cursorTarget;
_canmove = canmove cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
if (_hasFuelE) then {
_isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_fuel_tank_stairs_ep1") or (cursorTarget isKindOf "Land_wagon_tanker") or (cursorTarget isKindOf "Land_fuelstation") or (cursorTarget isKindOf "Land_fuelstation_army");
@@ -101,6 +103,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
s_player_forceSave = -1;
};
*/
//flip vehicle
if ((_isVehicletype) and !_canmove and _isAlive and (player distance cursorTarget >= 2)) then {
if (s_player_flipveh < 0) then {
s_player_flipveh = player addAction [format[localize "str_actions_flipveh",_text], "\z\addons\dayz_code\actions\player_flipvehicle.sqf",cursorTarget, 1, true, true, "", ""];
};
} else {
player removeAction s_player_flipveh;
s_player_flipveh = -1;
};
//Allow player to fill jerrycan
if(_hasFuelE and _isFuel and _canDo) then {
@@ -144,14 +155,6 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
s_player_fireout = -1;
};
//place tent
//if(_hasTent and _canDo) then {
// s_player_placetent = player addAction [localize "Place Tent", "\z\addons\dayz_code\actions\tent_pitch.sqf",cursorTarget, 0, false, true, "", ""];
//} else {
// player removeAction s_player_placetent;
// s_player_placetent = -1;
//};
//Packing my tent
if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_packtent < 0) and (player distance cursorTarget < 3)) then {
@@ -411,11 +414,60 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
if (s_player_parts_crtl < 0) then {
// [_trader_id, _category, ];
_buy = player addAction ["Buy Vehicle", "\z\addons\dayz_code\actions\buy_db.sqf",[41], 99, true, false, "",""];
_sell = player addAction ["Sell Vehicle", "\z\addons\dayz_code\actions\sell_db.sqf",[41], 98, true, false, "",""];
_buy = player addAction ["Buy Car", "\z\addons\dayz_code\actions\buy_db.sqf",[41], 99, true, false, "",""];
_sell = player addAction ["Sell Car", "\z\addons\dayz_code\actions\sell_db.sqf",[41], 98, true, false, "",""];
_buy1 = player addAction ["Buy Truck", "\z\addons\dayz_code\actions\buy_db.sqf",[42], 99, true, false, "",""];
_sell1 = player addAction ["Sell Truck", "\z\addons\dayz_code\actions\sell_db.sqf",[42], 98, true, false, "",""];
_buy2 = player addAction ["Buy Offroad", "\z\addons\dayz_code\actions\buy_db.sqf",[43], 99, true, false, "",""];
_sell2 = player addAction ["Sell Offroad", "\z\addons\dayz_code\actions\sell_db.sqf",[43], 98, true, false, "",""];
_buy2 = player addAction ["Buy Helicopter", "\z\addons\dayz_code\actions\buy_db.sqf",[44], 99, true, false, "",""];
_sell2 = player addAction ["Sell Helicopter", "\z\addons\dayz_code\actions\sell_db.sqf",[44], 98, true, false, "",""];
_buy2 = player addAction ["Buy Helicopter", "\z\addons\dayz_code\actions\buy_db.sqf",[44], 99, true, false, "",""];
_sell2 = player addAction ["Sell Helicopter", "\z\addons\dayz_code\actions\sell_db.sqf",[44], 98, true, false, "",""];
s_player_parts set [count s_player_parts,_buy];
s_player_parts set [count s_player_parts,_sell];
s_player_parts set [count s_player_parts,_buy1];
s_player_parts set [count s_player_parts,_sell1];
s_player_parts set [count s_player_parts,_buy2];
s_player_parts set [count s_player_parts,_sell2];
s_player_parts_crtl = 1;
};
};
//auto_trader_2
if (_isMan and _traderType == auto_trader_2) then {
if (s_player_parts_crtl < 0) then {
// [_trader_id, _category, ];
_buy = player addAction ["Buy Car", "\z\addons\dayz_code\actions\buy_db.sqf",[41], 99, true, false, "",""];
_sell = player addAction ["Sell Car", "\z\addons\dayz_code\actions\sell_db.sqf",[41], 98, true, false, "",""];
_buy1 = player addAction ["Buy Truck", "\z\addons\dayz_code\actions\buy_db.sqf",[42], 99, true, false, "",""];
_sell1 = player addAction ["Sell Truck", "\z\addons\dayz_code\actions\sell_db.sqf",[42], 98, true, false, "",""];
_buy2 = player addAction ["Buy Offroad", "\z\addons\dayz_code\actions\buy_db.sqf",[43], 99, true, false, "",""];
_sell2 = player addAction ["Sell Offroad", "\z\addons\dayz_code\actions\sell_db.sqf",[43], 98, true, false, "",""];
_buy2 = player addAction ["Buy Helicopter", "\z\addons\dayz_code\actions\buy_db.sqf",[44], 99, true, false, "",""];
_sell2 = player addAction ["Sell Helicopter", "\z\addons\dayz_code\actions\sell_db.sqf",[44], 98, true, false, "",""];
_buy2 = player addAction ["Buy Helicopter", "\z\addons\dayz_code\actions\buy_db.sqf",[45], 99, true, false, "",""];
_sell2 = player addAction ["Sell Helicopter", "\z\addons\dayz_code\actions\sell_db.sqf",[45], 98, true, false, "",""];
s_player_parts set [count s_player_parts,_buy];
s_player_parts set [count s_player_parts,_sell];
s_player_parts set [count s_player_parts,_buy1];
s_player_parts set [count s_player_parts,_sell1];
s_player_parts set [count s_player_parts,_buy2];
s_player_parts set [count s_player_parts,_sell2];
s_player_parts_crtl = 1;
};

View File

@@ -19,7 +19,7 @@ Missing:
*/
private ["_looptime","_sun_factor","_building_factor","_vehicle_factor","_fire_factor","_water_factor","_rain_factor","_night_factor","_wind_factor","_difference","_hasfireffect","_isinbuilding","_isinvehicle","_raining","_sunrise","_building"];
private["_looptime","_vehicle_factor","_moving_factor","_fire_factor","_rain_factor","_night_factor","_wind_factor","_building_factor","_sun_factor","_water_factor","_difference","_hasfireffect","_isinbuilding","_isinvehicle","_raining","_sunrise","_vel","_speed","_fireplaces","_building","_daytime","_height_mod","_temp"];
_looptime = _this;
@@ -56,7 +56,7 @@ Missing:
private["_vel","_speed"];
_vel = velocity player;
_speed = round((_vel distance [0,0,0]) * 3.5);
_difference = (_moving_factor * (_speed / 20)) min 1;
_difference = (_moving_factor * (_speed / 20)) min 7;
};
//fire
@@ -124,21 +124,31 @@ Missing:
//rain
if(_raining && !_isinvehicle && !_isinbuilding) then {
_difference = _difference + _rain_factor;
_difference = _difference + (rain * _rain_factor);
};
//night
private ["_daytime"];
if((daytime < _sunrise || daytime < (24 - _sunrise)) && !_isinvehicle && !_isinbuilding) then {
if((daytime < _sunrise || daytime > (24 - _sunrise)) && !_isinvehicle) then {
_daytime = if(daytime < 12) then {daytime + 24} else {daytime};
if(_isinbuilding) then {
_difference = _difference + ((((_night_factor * -1) / (_sunrise^2)) * ((_daytime - 24)^2) + _night_factor)) / 2;
} else {
_difference = _difference + (((_night_factor * -1) / (_sunrise^2)) * ((_daytime - 24)^2) + _night_factor);
};
};
//wind
if(((wind select 0) > 4 || (wind select 1) > 4) && !_isinvehicle && !_isinbuilding ) then {
_difference = _difference + _wind_factor;
};
//height
if (!_isinvehicle && overcast >= 0.6) then {
_height_mod = ((getPosASL player select 2) / 100) / 2;
_difference = _difference - _height_mod;
};
//Calculate Change Value Basic Factor Looptime Correction Adjust Value to current used temperatur scala
_difference = _difference * SleepTemperatur / (60 / _looptime) * ((dayz_temperaturmax - dayz_temperaturmin) / 100);

View File

@@ -1,6 +1,6 @@
private["_unit","_distance","_i","_listTalk","_zombie","_targets","_pos"];
private["_unit","_distance","_doRun","_pos","_listTalk","_zombie","_targets"];
//Alert Zed's to noise of shot
_pos = _this select 0;
_unit = _this select 0;
_distance = _this select 1;
_doRun = _this select 2;
_pos = _this select 3;

View File

@@ -1,5 +1,5 @@
private["_list","_Pos","_randrefpoint","_PosList","_PosSelect","_Pos","_list","_animalssupported","_type","_root","_favouritezones","_GroupMarker","_agent","_id","_tame"];
private["_list","_animalssupported","_type","_root","_favouritezones","_randrefpoint","_PosList","_PosSelect","_Pos","_GroupMarker","_agent","_id","_pos","_tame"];
_list = getposATL player nearEntities [["CAAnimalBase"],dayz_animalDistance];
if (count _list < dayz_maxAnimals) then {

View File

@@ -1,4 +1,4 @@
private["_vel","_speed","_scalePose","_scaleMvmt","_scaleLight","_scaleAlert","_anim","_anim4","_initial","_isDay","_nearFlare","_nearFire","_nearLight","_scaler","_pos"];
private["_vel","_speed","_pos","_scalePose","_scaleMvmt","_scaleLight","_scaleAlert","_anim","_anim4","_initial","_scaleSound","_nearFlare","_scaler","_nearLight","_nearFire","_building","_isPlayerInside","_audial"];
_vel = velocity (vehicle player);
_speed = (_vel distance [0,0,0]);
_pos = getPosATL player;

View File

@@ -1,4 +1,4 @@
private["_unit","_ammo","_audible","_distance","_listTalk","_weapon"];
private["_unit","_weapon","_ammo","_projectile","_audible","_caliber","_distance","_i","_listTalk","_group","_targets","_id"];
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
_unit = _this select 0;
_weapon = _this select 1;
@@ -12,10 +12,9 @@ _distance = round(_audible * 10 * _caliber);
dayz_disAudial = _distance;
dayz_firedCooldown = time;
// Put everyone in range of the bullet into combat
//_id = _this spawn player_projectileNear;
// Color in the combat icon
dayz_combat = 1;
if (_ammo isKindOf "Melee") exitWith {
_unit playActionNow "GestureSwing";
};
@@ -41,7 +40,6 @@ if (_ammo isKindOf "SmokeShell") then {
} forEach _listTalk;
} else {
_id = [_unit,_distance,true,(getPosATL player)] spawn player_alertZombies;
//Check if need to place arrow
if (_ammo isKindOf "Bolt") then {
_id = _this spawn player_crossbowBolt;

View File

@@ -1,12 +1,10 @@
private ["_objects"];
private["_objects","_dialog","_magazineArray","_control","_i","_item","_val","_max"];
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage","VaultStorage"], 10];
{
dayzUpdateVehicle = [_x,"all"];
publicVariableServer "dayzUpdateVehicle";
} foreach _objects;
private["_dialog","_magazineArray","_control","_item","_val","_max"];
disableSerialization;
_dialog = _this select 0;
_magazineArray = [];

View File

@@ -1,76 +1,114 @@
_isAir = vehicle player iskindof "Air";
_inVehicle = (vehicle player != player);
_fastRun = _this select 0;
_dateNow = (DateToNumber date);
_maxZombies = dayz_maxLocalZombies;
_age = -1;
if (!_inVehicle) then {
// If they just got out of a vehicle, boost their per-player zombie limit by 5 in hopes of allowing insta-spawn zombies
if (dayz_inVehicle and !_inVehicle) then {
dayz_spawnWait = -300;
//_maxZombies = _maxZombies + 2;
};
dayz_inVehicle = _inVehicle;
//if (((time - dayz_spawnWait) < dayz_spawnDelay) or ((time - dayz_lootWait) < dayz_lootDelay)) exitWith {diag_log("Skipping Check since neither loot or zombies are ready");};
//if (((time - dayz_spawnWait) < dayz_spawnDelay) and ((time - dayz_lootWait) < dayz_lootDelay)) exitWith {};
//diag_log("SPAWN CHECKING: Starting");
_locationstypes = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
_nearestCity = nearestLocations [getPos player, _locationstypes, 600];
//_nearestCity = [_locationstypes,[position player,600],false] call bis_fnc_locations;
//diag_log ("0: " +str(_nearestCity));
//_position = position (_nearestCity select 0);
_radius = 160;
_position = getPosATL player;
//waitUntil{_position nearObjectsReady 200};
_nearby = _position nearObjects ["building",200]; //nearestObjects [player, ["building"], 200];
_tooManyZs = {alive _x} count (_position nearEntities ["zZombie_Base",400]) > dayz_maxLocalZombies;
{
_type = typeOf _x;
_config = configFile >> "CfgBuildingLoot" >> _type;
_canLoot = isClass (_config);
if (_canLoot) then {
_dis = _x distance player;
if ((_dis < 120) and (_dis > 30)) then {
_nearbytype = type (_nearestCity select 0);
_nearby = _position nearObjects ["Building",_radius];
switch (_nearbytype) do {
default {
_maxZombies = 20;
};
case "NameLocal": {
_maxZombies = 40;
};
case "NameVillage": {
_maxZombies = 60;
};
case "NameCity": {
_maxZombies = 80;
};
case "NameCityCapital": {
_maxZombies = 100;
};
};
if (_inVehicle) then {
_maxZombies = _maxZombies / 2;
};
_tooManyZs = count (_position nearEntities ["zZombie_Base",60]) > _maxZombies;
//diag_log("Too Many Zeds: " +str(_tooManyZs));
//diag_log(format["SPAWN CHECK: Building count is %1", count _nearby]);
{
//diag_log("SPAWN CHECK: Start of Loop");
_type = typeOf _x;
_config = configFile >> "CfgBuildingLoot" >> _type;
_canZombie = isClass (_config);
_canLoot = ((count (getArray (_config >> "lootPos"))) > 0);
_dis = _x distance player;
if ((!_inVehicle) and (_canLoot)) then {
//diag_log("SPAWN LOOT: " + _type + " Building is lootable");
//dayz_serverSpawnLoot = [_dis, _x];
//publicVariableServer "dayz_serverSpawnLoot";
_keepAwayDist = ((sizeOf _type)+5);
_isNoone = {isPlayer _x} count (_x nearEntities ["CAManBase",_keepAwayDist]) == 0;
//diag_log(format["SPAWN LOOT: isNoone: %1 | keepAwayDist %2 | %3", str(_isNoone), _keepAwayDist, _type]);
if (_isNoone) then {
_looted = (_x getVariable ["looted",-0.1]);
_cleared = (_x getVariable ["cleared",true]);
/*
if(isServer) then {
_dateNow = (DateToNumber date);
_age = (_dateNow - _looted) * 525948;
} else {
_dateNow = serverTime;
_age = (_dateNow * 60) - _looted;
};
*/
_dateNow = (DateToNumber date);
_age = (_dateNow - _looted) * 525948;
//diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
if ((_age > 10) and (!_cleared) and !_inVehicle) then {
_nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
{deleteVehicle _x} forEach _nearByObj;
_x setVariable ["cleared",true,true];
_x setVariable ["looted",_dateNow,true];
};
if ((_age > 10) and (_cleared) and !_inVehicle) then {
if (_age > 8) then {
//diag_log("SPAWN LOOT: Spawning loot");
//Register
_x setVariable ["looted",_dateNow,true];
//cleanup
_handle = [_x,_fastRun] spawn building_spawnLoot;
waitUntil{scriptDone _handle};
//_nearByObj = (getPosATL _x) nearObjects ["ReammoBox",((sizeOf _type)+5)];
//{deleteVehicle _x} forEach _nearByObj;
dayz_lootWait = time;
[_x] call building_spawnLoot;
};
};
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
if (!_tooManyZs) then {
private["_zombied"];
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);
_age = (_dateNow - _zombied) * 525948;
if (_age > 5) then {
_bPos = getPosATL _x;
_zombiesNum = {alive _x} count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]);
if (_zombiesNum == 0) then {
//Randomize Zombies
_x setVariable ["zombieSpawn",_dateNow,true];
_handle = [_x,_fastRun] spawn building_spawnZombies;
waitUntil{scriptDone _handle};
//} else {
//_x setVariable ["zombieSpawn",_dateNow,true];
};
};
if (_canZombie) then {
if (dayz_spawnZombies < _maxZombies) then {
if (!_tooManyZs) then {
private["_zombied"];
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);
_age = (_dateNow - _zombied) * 525948;
//diag_log(format["Date: %1 | ZombieSpawn: %2 | age: %3 | building: %4 (%5)", _dateNow, _zombied, _age, str(_x), _dis]);
if (_age > 1) then {
_bPos = getPosATL _x;
_zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]);
if (_zombiesNum == 0) then {
//Randomize Zombies
_x setVariable ["zombieSpawn",_dateNow,true];
[_x] call building_spawnZombies;
};
};
} else {
dayz_spawnWait = time;
dayz_spawnZombies = 0;
};
//} else {
//dayz_spawnWait = time;
//dayz_spawnZombies = 0;
};
};
if (!_fastRun) then {
sleep 0.1;
};
} forEach _nearby;
};
} forEach _nearby;

View File

@@ -1,9 +1,9 @@
private["_display","_ctrlBlood","_bloodVal","_ctrlFood","_ctrlThirst","_foodVal","_ctrlTemp","_tempVal","_array"];
private["_foodVal","_thirstVal","_tempVal","_combatVal","_array","_display","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_ctrlTemp","_ctrlEar","_ctrlEye","_ctrlHumanity","_ctrlCombat","_ctrlFracture","_bloodLvl","_thirstLvl","_foodLvl","_blood","_thirst","_food","_temp","_tempImg","_tempLvl","_ca","_visualtext","_visual","_audibletext","_audible","_humanity","_guiHumanity","_humanityText"];
disableSerialization;
_foodVal = 1 - (dayz_hunger / SleepFood);
_thirstVal = 1 - (dayz_thirst / SleepWater);
_tempVal = (dayz_temperatur / dayz_temperaturnormal); //TeeChange
_tempVal = 1 - ((dayz_temperatur - dayz_temperaturmin)/(dayz_temperaturmax - dayz_temperaturmin)); // Normalise to [0,1]
_combatVal = 1 - dayz_combat; // May change later to be a range of red/green to loosely indicate 'time left in combat'
if (uiNamespace getVariable ['DZ_displayUI', 0] == 1) exitWith {
@@ -21,7 +21,7 @@ _ctrlThirst = _display displayCtrl 1302;
_ctrlTemp = _display displayCtrl 1306; //TeeChange
_ctrlEar = _display displayCtrl 1304;
_ctrlEye = _display displayCtrl 1305;
_ctrlHumanity = _display displayCtrl 1207;
//_ctrlHumanity = _display displayCtrl 1207;
_ctrlCombat = _display displayCtrl 1307;
_ctrlFracture = _display displayCtrl 1203;
@@ -29,9 +29,108 @@ _ctrlFracture = _display displayCtrl 1203;
_ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 0.5];
_ctrlFood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_foodVal))),(Dayz_GUI_G * _foodVal),(Dayz_GUI_B * _foodVal), 0.5];
_ctrlThirst ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_thirstVal))),(Dayz_GUI_G * _thirstVal),(Dayz_GUI_B * _thirstVal), 0.5];
_ctrlTemp ctrlSetTextColor [(Dayz_GUI_R + (0.3 * _tempVal)),(Dayz_GUI_G * _tempVal),(Dayz_GUI_B + (0.25 * (1/_tempVal))), 0.5]; //TeeChange Coulor should change into red if value is higher as normale temp and into blue if coulor is lower as normal temp
_ctrlTemp ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_tempVal))), (Dayz_GUI_G * _tempVal), _tempVal, 0.5]; // Color ranges from iceblue (cold) to red (hot)
_ctrlCombat ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 0.5];
/*
Blood: round((r_player_blood / 2) / 1000) = _bloodLvl (6 = full, 1 = empty)
Thirst: round(_thirstVal / 0.25) = _thirstLvl (4 = full, 0 = empty)
Hunger: round(_foodVal / 0.25) = _foodLvl (4 = full, 0 = empty)
Temp: round(dayz_temperatur) = tempLvl (>= 36 = full <= 28 = empty)
*/
_blood = "";
_thirst = "";
_food = "";
_temp = "";
_tempImg = 0;
_bloodLvl = round((r_player_blood / 2) / 1000);
_thirstLvl = round(_thirstVal / 0.25);
_foodLvl = round(_foodVal / 0.25);
_tempLvl = round(dayz_temperatur);
/*
diag_log format["DEBUG: bloodlvl: %1 r_player_blood: %2 bloodval: %3",_bloodLvl, r_player_blood, _bloodVal];
diag_log format["DEBUG: thirstlvl: %1 dayz_thirst: %2 thirstval: %3",_thirstLvl, dayz_thirst, _thirstVal];
diag_log format["DEBUG: foodlvl: %1 dayz_hunger: %2 foodval: %3",_foodLvl, dayz_hunger, _foodVal];
diag_log format["DEBUG: templvl: %1 dayz_temperatur: %2 tempval: %3",_tempLvl, dayz_temperatur, _tempVal];
*/
if (_bloodLvl == 0) then {
_blood = "\z\addons\dayz_code\gui\status_blood_inside_1_ca.paa";
} else {
_blood = "\z\addons\dayz_code\gui\status_blood_inside_" + str(_bloodLvl) + "_ca.paa";
};
_thirst = "\z\addons\dayz_code\gui\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa";
_food = "\z\addons\dayz_code\gui\status_food_inside_" + str(_foodLvl) + "_ca.paa";
if ( _tempLvl >= 36 ) then { _tempImg = 4 };
if ( _tempLvl > 33 and _tempLvl < 36 ) then { _tempImg = 3 };
if ( _tempLvl >= 30 and _tempLvl <= 33 ) then { _tempImg = 2 };
if ( _tempLvl > 28 and _tempLvl < 30 ) then { _tempImg = 1 };
if ( _tempLvl <= 28 ) then { _tempImg = 0 };
_temp = "\z\addons\dayz_code\gui\status_temp_" + str(_tempImg) + "_ca.paa";
_ctrlBlood ctrlSetText _blood;
_ctrlThirst ctrlSetText _thirst;
_ctrlFood ctrlSetText _food;
_ctrlTemp ctrlSetText _temp;
/*
Visual:
*/
_visualtext = "";
_visual = round((dayz_disVisual / 100) * 4) min 5;
if (_visual > 0) then {_visualtext = "\z\addons\dayz_code\gui\val_" + str(_visual) + "_ca.paa"};
_ctrlEye ctrlSetText _visualtext;
/*
Audible:
*/
_audibletext = "";
_audible = round((dayz_disAudial / 50) * 4) min 5;
if (_audible > 0) then {_audibletext = "\z\addons\dayz_code\gui\val_" + str(_audible) + "_ca.paa"};
_ctrlEar ctrlSetText _audibletext;
/*
Fracture:
*/
if (!canStand player) then {
if (!(ctrlShown _ctrlFracture)) then {
r_fracture_legs = true;
_ctrlFracture ctrlShow true;
};
};
/*
Flashing:
*/
if (_combatVal == 0) then {
_ctrlCombat call player_guiControlFlash;
};
if (_bloodVal < 0.2) then {
_ctrlBlood call player_guiControlFlash;
};
if (_thirstVal < 0.2) then {
_ctrlThirst call player_guiControlFlash;
};
if (_foodVal < 0.2) then {
_ctrlFood call player_guiControlFlash;
};
if (_tempVal > 0.8) then { //TeeChange
_ctrlTemp call player_guiControlFlash;
};
if (r_player_injured) then {
_ctrlBleed call player_guiControlFlash;
};
/*
_humanity = player getVariable["humanity",0];
_guiHumanity = 0;
@@ -50,47 +149,5 @@ if(_humanity != dayz_lastHumanity) then {
};
*/
_visualtext = "";
_visual = round((dayz_disVisual / 100) * 4) min 5;
if (_visual > 0) then {_visualtext = "\z\addons\dayz_code\gui\val_" + str(_visual) + "_ca.paa"};
_audibletext = "";
_audible = round((dayz_disAudial / 50) * 4) min 5;
if (_audible > 0) then {_audibletext = "\z\addons\dayz_code\gui\val_" + str(_audible) + "_ca.paa"};
_ctrlEye ctrlSetText _visualtext;
_ctrlEar ctrlSetText _audibletext;
if (_combatVal == 0) then {
_ctrlCombat call player_guiControlFlash;
};
if (_bloodVal < 0.2) then {
_ctrlBlood call player_guiControlFlash;
};
if (_thirstVal < 0.2) then {
_ctrlThirst call player_guiControlFlash;
};
if (_foodVal < 0.2) then {
_ctrlFood call player_guiControlFlash;
};
if (_tempVal < 0.833) then { //TeeChange
_ctrlTemp call player_guiControlFlash;
};
if (r_player_injured) then {
_ctrlBleed call player_guiControlFlash;
};
if (!canStand player) then {
if (!(ctrlShown _ctrlFracture)) then {
r_fracture_legs = true;
_ctrlFracture ctrlShow true;
};
};
_array = [_foodVal,_thirstVal];
_array

View File

@@ -1,5 +1,5 @@
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","_result","_evType","_recordable","_inVehicle","_isPlayer","_isRocket","_dmgDistance","_isBallistic","_handled"];
private["_unit","_firer","_distance","_weapon","_ammo","_killerID","_handled","_arc","_isBallistic","_dmgDistance","_isRocket","_isPlayer","_inVehicle","_evType","_recordable","_turretDir","_weaponDir","_pos1","_pos2","_facing","_firingArc","_isInFront","_isInRear","_id"];
//Init
//[unit, firer, distance, weapon, muzzle, mode, ammo]
_unit = _this select 0;
@@ -20,12 +20,13 @@ private["_unit","_magazine","_used","_quantity","_magsNet","_magsWhole","_key","
_recordable = false;
// Both the firer and those nearby (<=8m) go into "combat" to prevent ALT-F4
_firer setVariable["startcombattimer", 1, true];
//diag_log ("DEBUG: AMMO TYPE: " +str(_ammo));
_firer setVariable["startcombattimer", 1, false];
if (_distance <= 8) then {
_unit setVariable["startcombattimer", 1, true];
_unit setVariable["startcombattimer", 1, false];
};
if (_inVehicle) exitWith{};
if (_firer == player) exitWith{};

View File

@@ -1,18 +1,20 @@
private["_unit","_targets","_move","_damage","_wound","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_result","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
private["_unit","_vehicle","_targets","_move","_rnd","_wound","_dir","_hpList","_hp","_damage","_chance","_strH","_dam","_total","_result","_tPos","_zPos","_inAngle","_cantSee","_isZombieInside","_building","_isPlayerInside"];
_unit = _this;
_vehicle = (vehicle player);
_targets = _unit getVariable ["targets",[]];
if (!(_vehicle in _targets) and ((random 1) < 0.9)) exitWith {};
//if (!(_vehicle in _targets)) exitWith {};
//Do the attack
_move = "ZombieStandingAttack1";
_rnd = 0;
_wound = "";
if (r_player_unconscious) then {
if (r_player_unconscious && _vehicle == player) then {
_unit doMove (getPos player);
_rnd = round(random 4) + 1;
_move = "ZombieFeed" + str(_rnd);
} else {
_unit doMove (getPos player);
_rnd = round(random 9) + 1;
_move = "ZombieStandingAttack" + str(_rnd);
};
@@ -27,46 +29,41 @@ if (_vehicle != player) then {
_hpList = _vehicle call vehicle_getHitpoints;
_hp = _hpList call BIS_fnc_selectRandom;
_wound = getText(configFile >> "cfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> _hp >> "name");
_total = 0;
_damage = random 0.03;
_chance = round(random 12);
if(["Glass",_hp,false] call fnc_inString) then {
_damage = 0.03;
_strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0];
_total = (_dam + _damage);
};
if(["Wheel",_hp,false] call fnc_inString) then {
_damage = 0.02;
_strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0];
_total = (_dam + _damage);
};
if(["Body",_hp,false] call fnc_inString) then {
_damage = 0.01;
_strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0];
_total = (_dam + _damage);
};
if(["Engine",_hp,false] call fnc_inString) then {
_damage = 0.01;
_strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0];
_total = (_dam + _damage);
};
if(["Fuel",_hp,false] call fnc_inString) then {
if ((_wound == "Glass1") or (_wound == "Glass2") or (_wound == "Glass3") or (_wound == "Glass4") or (_wound == "Glass5") or (_wound == "Glass6")) then {
[_unit,"hit",0,false] call dayz_zombieSpeak;
_damage = 0.01;
_strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0];
_total = (_dam + _damage);
//diag_log ("Hitpoints " +str(_wound) +str(_total));
//_result = [_vehicle, _wound,_total, _unit,"zombie"] call fnc_usec_damageVehicle;
//dayzHitV = [_vehicle,_wound,_total, _unit,"zombie"];
//publicVariable "dayzHitV";
if (_total >= 1) then {
if ((_chance % 4) == 0) then {
if ((_vehicle isKindOf "ATV_Base_EP1") or (_vehicle isKindOf "Motorcycle")) then { player action ["eject", _vehicle] };
};
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
_wound = DAYZ_woundHit call BIS_fnc_selectRandomWeighted;
} else {
_wound = DAYZ_woundHit_ok call BIS_fnc_selectRandomWeighted;
};
_damage = 0.1 + random (1.2);
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
[_unit,"hit",0,false] call dayz_zombieSpeak;
} else {
_result = [_vehicle, _wound,_total, _unit,"zombie"] call fnc_usec_damageVehicle;
dayzHitV = [_vehicle,_wound,_total, _unit,"zombie"];
publicVariable "dayzHitV";
};
};
if(_total > 0) then {
[_unit,"hit",0,false] call dayz_zombieSpeak;
_result = [_vehicle, _wound,_total, _unit,"zombie"] call fnc_usec_damageVehicle;
dayzHitV = [_vehicle,_wound,_total, _unit,"zombie"];
publicVariable "dayzHitV";
};
} else {
//Did he hit?
if ((_unit distance player) <= 3) then {
@@ -87,8 +84,8 @@ if (_vehicle != player) then {
_damage = 0.1 + random (1.2);
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
dayzHit = [player,_wound, _damage, _unit,"zombie"];
publicVariable "dayzHit";
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
[_unit,"hit",0,false] call dayz_zombieSpeak;
} else {
/*
@@ -97,8 +94,8 @@ if (_vehicle != player) then {
_damage = 0.1 + random (1.2);
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
dayzHit = [player,_wound, _damage, _unit,"zombie"];
publicVariable "dayzHit";
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
[_unit,"hit",0,false] call dayz_zombieSpeak;
};
*/

View File

@@ -1,6 +1,7 @@
private["_listTalk","_isZombie","_group","_eyeDir","_attacked","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"];
private["_refObj","_listTalk","_pHeight","_attacked","_list","_dist","_group","_chance","_last","_entHeight","_delta","_isZInside","_building","_isPlayerInside","_targets","_cantSee","_tPos","_zPos","_eyeDir","_inAngle","_lowBlood"];
_refObj = vehicle player;
_listTalk = (position _refObj) nearEntities ["zZombie_Base",200];
//_listTalk = (position _refObj) nearEntities ["zZombie_Base",200];
_listTalk = (position _refObj) nearEntities ["zZombie_Base",100];
_pHeight = (getPosATL _refObj) select 2;
_attacked = false;

View File

@@ -1,4 +1,4 @@
private["_itemType","_iPos","_indexLootSpawn","_iArray","_iItem","_iClass","_item","_qty","_max","_tQty","_arrayLootSpawn","_canType"];
private["_itemType","_weights","_iItem","_iClass","_iPos","_radius","_item","_arrayLootSpawn","_qty","_max","_tQty","_indexLootSpawn","_canType","_mags","_ipos"];
// [_itemType,_weights]
_iItem = _this select 0;
_iClass = _this select 1;
@@ -12,7 +12,7 @@ switch (_iClass) do {
_itemType = _arrayLootSpawn select 0;
_weights = _arrayLootSpawn call fnc_buildWeightedArray;
_qty = 0;
_max = ceil(random 4) + 1;
_max = ceil(random 2) + 1;
//diag_log ("LOOTSPAWN: QTY: " + str(_max) + " ARRAY: " + str(_arrayLootSpawn));
while {_qty < _max} do {
private["_tQty","_indexLootSpawn","_canType"];
@@ -36,7 +36,7 @@ switch (_iClass) do {
_item addWeaponCargoGlobal [_iItem,1];
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
if (count _mags > 0) then {
_item addMagazineCargoGlobal [(_mags select 0),(round(random 3))];
_item addMagazineCargoGlobal [(_mags select 0),(round(random 1))];
};
};
case "magazine": {

View File

@@ -1,10 +1,10 @@
private["_group","_target","_targetMen","_targetDis","_c","_man","_manDis","_targets","_lead","_leadheight","_nearEnts","_rnd","_assigned"];
private["_group","_target","_lead","_targetMen","_targetDis","_range","_assigned","_targets","_obj","_dis","_fires","_rnd","_man","_manDis","_c"];
_group = _this;
_target = objNull;
_lead = leader _group;
_targetMen = [];
_targetDis = [];
_range = 500;
_range = 300;
_assigned = _group getVariable ["targets",[]];
{

View File

@@ -1,4 +1,4 @@
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_isAlive","_myDest","_newDest","_rnd","_lootType","_id"];
_position = _this select 0;
_doLoiter = _this select 1;
_unitTypes = _this select 2;
@@ -57,7 +57,8 @@ if (!_doLoiter) then {
if (_nearByPlayer) then {
_attempt = 0;
while {_nearByPlayer} do {
_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos;
//_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos; Orignal
_position = [_position,0,20,20,0,20,0] call BIS_fnc_findSafePos;
_agent setPos _position;
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
_attempt = _attempt + 1;

View File

@@ -33,7 +33,7 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.dayzmod.com";
version = "1.7.4.4";
version = "1.7.5.D1207";
hiveVersion = 0.96; //0.93
};
};
@@ -100,23 +100,23 @@ class CfgSurvival {
};
class Meat {
class Default {
yield = 2;
yield = 1;
};
class Cow: Default {
yield = 8;
yield = 6;
};
class Cow01: Cow{};
class Cow02: Cow{};
class Cow03: Cow{};
class Cow04: Cow{};
class Goat: Default {
yield = 3;
yield = 4;
};
class Sheep: Default {
yield = 5;
yield = 3;
};
class WildBoar: Default {
yield = 4;
yield = 2;
};
};
};
@@ -356,6 +356,7 @@ class CfgBuildingLoot {
{ "Mk_48_DZ","weapon" },
{ "M249_DZ","weapon" },
//{"BAF_L85A2_RIS_CWS","weapon"},
{"BAF_L85A2_RIS_Holo","weapon"},
{ "DMR","weapon" },
{ "","military" },
{ "","medical" },
@@ -365,6 +366,11 @@ class CfgBuildingLoot {
{ "AmmoBoxSmall_762","object" },
{ "Skin_Camo1_DZ","magazine" },
{ "Skin_Sniper1_DZ","magazine" },
{"G36C","weapon"},
{"G36C_camo","weapon"},
//{"G36_C_SD_camo","weapon"},
{"G36A_camo","weapon"},
{"G36K_camo","weapon"},
{ "Skin_Rocket_DZ","magazine" },
{ "Skin_Soldier1_DZ","magazine" }
};
@@ -377,16 +383,21 @@ class CfgBuildingLoot {
0.01, //{"BAF_AS50_scoped","weapon"},
0.03, //{"Mk_48_DZ","weapon"},
0.05, //{"M249_DZ","weapon"},
//0.01, //{"BAF_L85A2_RIS_CWS","weapon"},
0.10, //{"DMR","weapon"},
0.01, //{"BAF_L85A2_RIS_CWS","weapon"}, BAF_L85A2_RIS_Holo
0.06, //{"DMR","weapon"},
1, //{"","military"},
0.5, //{"","medical"},
0.1, //{"MedBox0","object"},
0.01, //{"NVGoggles","weapon"}
0.1,
0.1,
0.08,
0.05,
0.02, //{"NVGoggles","weapon"}
0.1, //AmmoBoxSmall_556
0.1, //AmmoBoxSmall_762
0.08, //Skin_Camo1_DZ
0.05, //Skin_Sniper1_DZ
0.03, //G36C"
0.02, //G36C_camo
//0.01, //G36_C_SD_camo
0.02, //G36A_camo
0.02, //G36K_camo
0.01,
0.05
};
@@ -405,8 +416,8 @@ class CfgBuildingLoot {
};
itemChance[] = {
0.2,
0.5,
0.5
1,
0.2
};
};
class Military: Default {
@@ -450,7 +461,9 @@ class CfgBuildingLoot {
{ "","military" },
//{"Body","object"},
{ "ItemEtool","weapon" },
{"ItemSandbag","magazine"}
{"ItemSandbag","magazine"},
{"Sa58P_EP1","weapon"},
{"Sa58V_EP1","weapon"}
};
itemChance[] = {
0.05,
@@ -486,7 +499,9 @@ class CfgBuildingLoot {
2.50,
//0.20,
0.05,
0.02
0.02,
0.03,
0.03
};
};
class MilitarySpecial: Default {
@@ -501,7 +516,7 @@ class CfgBuildingLoot {
{ "M16A2GL","weapon" },
{ "M249_DZ","weapon" },
{ "M9SD","weapon" },
{ "M136","weapon" },
//{"M136","weapon"},
{ "AK_74","weapon" },
{ "M4A1_Aim","weapon" },
{ "AKS_74_kobra","weapon" },
@@ -526,21 +541,28 @@ class CfgBuildingLoot {
//Ammo
{ "AmmoBoxSmall_556","object" },
{ "AmmoBoxSmall_762","object" },
{ "NVGoggles","weapon" },
//{"NVGoggles","weapon"},
{ "Binocular","weapon" },
{ "ItemFlashlightRed","military" },
{ "ItemKnife","military" },
{ "ItemGPS","weapon" },
{ "ItemMap","military" },
{ "Binocular_Vector","military" },
{ "DZ_Assault_Pack_EP1","object" },
{ "DZ_Patrol_Pack_EP1","object" },
{ "DZ_Backpack_EP1","object" },
{ "","medical" },
{ "","generic" },
{ "","military" },
//{"Body","object"},
{"PipeBomb","magazine"},
{"Sa58V_RCO_EP1","weapon"},
{"Sa58V_CCO_EP1","weapon"},
{"G36_C_SD_camo","weapon"},
{"M40A3","weapon"},
{ "Skin_Soldier1_DZ","magazine" }
};
itemChance[] = {
@@ -548,7 +570,7 @@ class CfgBuildingLoot {
0.05,
0.01,
0.02,
0.01,
//0.01, //m136
0.10,
0.02,
0.10,
@@ -572,11 +594,11 @@ class CfgBuildingLoot {
0.08,
0.04,
0.02,
0.01,
//0.01, //NVGoggles
0.10,
0.05,
0.15,
0.01,
0.01, //ItemGPS
0.03,
0.01,
0.02,
@@ -584,9 +606,13 @@ class CfgBuildingLoot {
0.02,
0.30,
1.00,
5.00,
5.00, //military
//0.20,
0.01,
0.01, //PipeBomb
0.01, //Sa58V_RCO_EP1
0.01, //Sa58V_CCO_EP1
0.01, //{"G36_C_SD_camo","weapon"},
0.02, // M40A3
0.05
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -48,7 +48,6 @@ if (!isDedicated) then {
player_throwObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_throwObject.sqf";
player_alertZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_alertZombies.sqf";
player_fireMonitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
//player_combatLogged = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_combatLogged.sqf";
player_tameDog = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_tameDog.sqf";
//Objects
@@ -98,18 +97,39 @@ if (!isDedicated) then {
// TODO: need move it in player_monitor.fsm
// allow player disconnect from server, if loading hang, kicked by BE etc.
[] spawn {
private["_timeOut"];
private["_timeOut","_display","_control1","_control2"];
disableSerialization;
_timeOut = 0;
while { _timeOut < 60 } do {
dayz_loadScreenMsg = "";
diag_log "DEBUG: loadscreen guard started.";
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
// 40 sec timeout
while { _timeOut < 400 && !dayz_clientPreload } do {
if ( isNull _display ) then {
waitUntil { !dialog; };
startLoadingScreen ["","RscDisplayLoadCustom"];
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
};
if ( dayz_loadScreenMsg != "" ) then {
_control1 ctrlSetText dayz_loadScreenMsg;
dayz_loadScreenMsg = "";
};
_control2 ctrlSetText format["%1",round(_timeOut*0.1)];
_timeOut = _timeOut + 1;
sleep 1;
sleep 0.1;
};
if ( !dayz_preloadFinished ) then {
endLoadingScreen;
if ( !dayz_clientPreload ) then {
diag_log "DEBUG: loadscreen guard ended with timeout.";
disableUserInput false;
cutText ["Something went wrong! disconnect and try again!", "BLACK OUT",1];
1 cutText ["Something went wrong! disconnect and try again!", "PLAIN"];
player enableSimulation false;
};
} else { diag_log "DEBUG: loadscreen guard ended."; };
};
dayz_losChance = {
private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
@@ -203,6 +223,7 @@ if (!isDedicated) then {
_btnRespawn ctrlEnable false;
};
/*
dayz_disableAbort = {
private["_display","_btnAbort","_combattimeout"];
_combattimeout = player getVariable["combattimeout",0];
@@ -215,6 +236,7 @@ if (!isDedicated) then {
_btnAbort = _display displayCtrl 104;
_btnAbort ctrlEnable false;
};
*/
dayz_spaceInterrupt = {
private ["_dikCode", "_handled"];

View File

@@ -22,22 +22,21 @@
//Server only
if (isServer) then {
"dayzDeath" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
"dayzDeath" addPublicVariableEventHandler {(_this select 1) call server_playerDied};
"dayzDiscoAdd" addPublicVariableEventHandler {dayz_disco set [count dayz_disco,(_this select 1)];};
"dayzDiscoRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
"dayzPlayerSave" addPublicVariableEventHandler {(_this select 1) call server_playerSync;};
"dayzPublishObj" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
"dayzUpdateVehicle" addPublicVariableEventHandler {(_this select 1) call server_updateObject};
"dayzDeleteObj" addPublicVariableEventHandler {(_this select 1) call local_deleteObj};
"dayzPublishVeh" addPublicVariableEventHandler {(_this select 1) call server_publishVeh}; // for vehicle traders
// "dayzPublishBank" addPublicVariableEventHandler {(_this select 1) call server_publishBank};
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) call server_traders}; // for all traders
"dayzUpdateVehicle" addPublicVariableEventHandler {_id = (_this select 1) spawn server_updateObject};
"dayzDeleteObj" addPublicVariableEventHandler {_id = (_this select 1) spawn local_deleteObj};
"dayzLogin" addPublicVariableEventHandler {(_this select 1) call server_playerLogin};
"dayzLogin2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
"dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
"dayzUpdate" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_processUpdate};
"dayzLoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
"dayzCharSave" addPublicVariableEventHandler {(_this select 1) call server_playerSync};
// "dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
// "dayzUpdate" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_processUpdate};
"dayzLoginRecord" addPublicVariableEventHandler {(_this select 1) call dayz_recordLogin};
// "dayzCharSave" addPublicVariableEventHandler {(_this select 1) call server_playerSync};
"dayzCharDisco" addPublicVariableEventHandler {(_this select 1) call server_characterSync};
};
@@ -48,8 +47,7 @@ if (!isDedicated) then {
"dayzRoadFlare" addPublicVariableEventHandler {(_this select 1) spawn object_roadFlare};
"norrnRaDrag" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"};
"norrnRnoAnim" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\noAnim.sqf"};
"changeCharacter" addPublicVariableEventHandler {(_this select 1) call player_serverModelChange};
"dayzSwitch" addPublicVariableEventHandler {(_this select 1) call server_switchPlayer};
// "changeCharacter" addPublicVariableEventHandler {(_this select 1) call player_serverModelChange};
// "dayzSwitch" addPublicVariableEventHandler {(_this select 1) call server_switchPlayer};
"dayzFire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
//"dayz_combatLog" addPublicVariableEventHandler {nul=(_this select 1) spawn player_combatLogged};
};

View File

@@ -71,6 +71,7 @@ dayz_resetSelfActions = {
s_build_Wire_cat1 = -1;
s_player_deleteBuild = -1;
s_player_forceSave = -1;
s_player_flipveh = -1;
};
call dayz_resetSelfActions;
@@ -191,14 +192,13 @@ if(isnil "dayz_maxLocalZombies") then {
dayz_spawnPos = getPosATL player;
if(isDedicated) then {
dayz_disco = [];
};
if(isServer) then {
dayz_disco = [];
dayz_players = [];
dead_bodyCleanup = [];
needUpdate_objects = [];
botPlayers = [];
};
if(!isDedicated) then {

View File

@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version
{
idc = -1;
text = "DayZ 1.7.4.4";
text = "DayZ 1.7.5.D1207";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
class CA_TitleMainMenu;
@@ -1136,7 +1136,7 @@ class RscTitles
class RscPicture_1301: RscPictureGUI
{
idc = 1301;
text = "\z\addons\dayz_code\gui\status_food_inside_ca.paa";
//text = "\z\addons\dayz_code\gui\status_food_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.93 * safezoneH + safezoneY;
w = 0.06;
@@ -1145,7 +1145,7 @@ class RscTitles
class RscPicture_1300: RscPictureGUI
{
idc = 1300;
text = "\z\addons\dayz_code\gui\status_blood_inside_ca.paa";
//text = "\z\addons\dayz_code\gui\status_blood_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.86 * safezoneH + safezoneY;
w = 0.06;
@@ -1154,7 +1154,7 @@ class RscTitles
class RscPicture_1302: RscPictureGUI
{
idc = 1302;
text = "\z\addons\dayz_code\gui\status_thirst_inside_ca.paa";
//text = "\z\addons\dayz_code\gui\status_thirst_inside_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.79 * safezoneH + safezoneY;
w = 0.06;
@@ -1163,7 +1163,7 @@ class RscTitles
class RscPicture_1306: RscPictureGUI
{
idc = 1306;
text = "\z\addons\dayz_code\gui\status_temp_ca.paa";
//text = "\z\addons\dayz_code\gui\status_temp_ca.paa";
x = 0.955313 * safezoneW + safezoneX;
y = 0.72 * safezoneH + safezoneY;
w = 0.06;
@@ -1209,7 +1209,7 @@ class RscTitles
{
idc = 1701;
text = "\z\addons\dayz_code\gui\status_food_inside_ca.paa";
//text = "\z\addons\dayz_code\gui\status_food_inside_ca.paa";
x = 0.945313 * safezoneW + safezoneX;
y = 0.95 * safezoneH + safezoneY;
w = 0.04;
@@ -1218,7 +1218,7 @@ class RscTitles
class RscPicture_1702: RscPictureGUI
{
idc = 1702;
text = "\z\addons\dayz_code\gui\status_thirst_inside_ca.paa";
//text = "\z\addons\dayz_code\gui\status_thirst_inside_ca.paa";
x = 0.945313 * safezoneW + safezoneX;
y = 0.816666 * safezoneH + safezoneY;
w = 0.04;

View File

@@ -16,7 +16,7 @@
<Key ID="STR_INTRO_3"> <!-- use \n for linebreak (have them regularly!) -->
<Original>On 12 March 2013, a prion disease\nand spreads among the worlds population\ntriggering a global pandemic</Original>
<English>On 12 March 2013, a prion disease\nand spreads among the worlds population\ntriggering a global pandemic</English>
<German>Am 12. Mä 2013 breitet sich\neine Prionenkrankheit unter der Weltbevölkerung aus\nund löst eine globale Pandemie aus</German>
<German>Am 12. März 2013 breitet sich\neine Prionenkrankheit unter der Weltbevölkerung aus\nund löst eine globale Pandemie aus</German>
<Russian>12 марта 2013 г., прионное заболевание\nраспространяется среди населения всего земного шара,\nвызывая общую пандемию</Russian>
</Key>
<Key ID="STR_INTRO_4"> <!-- use \n for linebreak (have them regularly!) -->
@@ -164,7 +164,7 @@
<Key ID="str_build_01">
<Original>You have constructed a %1</Original>
<English>You have constructed a %1</English>
<German>You have constructed a %1</German>
<German>Du hast eine(n) %1 gebaut</German>
<Russian>Вы построили %1.</Russian>
</Key>
<Key ID="str_fireplace_02">
@@ -254,7 +254,7 @@
<Key ID="str_player_11">
<Original>You need to sit in the driver seat before you can repair this vehicle</Original>
<English>You need to sit in the driver seat before you can repair this vehicle</English>
<German>You need to sit in the driver seat before you can repair this vehicle</German>
<German>Sie müssen im Fahrersitz sitzen um dieses Fahrzeug reparieren zu können.</German>
<Russian>Для ремонта требуется занять место водителя хотя бы раз.</Russian>
</Key>
<Key ID="str_player_12">
@@ -266,19 +266,19 @@
<Key ID="str_player_13">
<Original>Waiting for character to create</Original>
<English>Waiting for character to create</English>
<German>Warte auf den Spieler um zu erstellen</German>
<German>Warte darauf, einen neuen Charakter um zu erstellen</German>
<Russian>Пожалуйста, выйдите в окно выбора игрока чтобы продолжить игру</Russian>
</Key>
<Key ID="str_player_14">
<Original>Retrying to Authenticate</Original>
<English>Retrying to Authenticate</English>
<German>Versuche erneut zu Authendifizieren</German>
<German>Versuche erneut zu Authentifizieren</German>
<Russian>Попытка аутентификации</Russian>
</Key>
<Key ID="str_player_15">
<Original>Requesting Authentication</Original>
<English>Requesting Authentication</English>
<German>Empfange Authendifisierung</German>
<German>Empfange Authentifizierung</German>
<Russian>Запрос аутентификации</Russian>
</Key>
<Key ID="str_player_16">
@@ -296,7 +296,7 @@
<Key ID="str_player_18">
<Original>You are running an incorrect version of DAYZ_CODE, please download this file from dayzmod.com/downloads (You are running version %1 and the server is running version %2)</Original>
<English>You are running an incorrect version of DAYZ_CODE, please download this file from dayzmod.com/downloads (You are running version %1 and the server is running version %2)</English>
<German>Du hast eine falsche version von DAYZ_CODE, bitte lade dir die neuste version runter www.dayzmod.com/downloads</German>
<German>Du hast eine falsche Version von DAYZ_CODE, bitte lade dir die neuste Version von www.dayzmod.com/downloads runter </German>
<Russian>Вы используете неверную версию DAYZ_CODE, пожалуйста, скачайте данный файл с dayzmod.com/downloads (Ваша версия %1, версия на сервере %2)</Russian>
</Key>
<Key ID="str_player_20">
@@ -320,13 +320,13 @@
<Key ID="str_player_23">
<Original>You must be in a forest and close to a tree to harvest wood.</Original>
<English>You must be in a forest and close to a tree to harvest wood.</English>
<German>Sie müssen in einem Wald sein und nah an einem Baum zum Holz ernten.</German>
<German>Sie müssen in einem Wald und nah an einem Baum sein, um Holz zu hacken.</German>
<Russian>Вы должны находится в лесу и подойти к дереву, чтобы нарубить дров.</Russian>
</Key>
<Key ID="str_player_24">
<Original>You do not have enough room in your inventory to do that.</Original>
<English>You do not have enough room in your inventory to do that.</English>
<German>Sie haben noch genug Platz in Ihrem Inventar, das zu tun.</German>
<German>Sie haben nicht genug Platz in Ihrem Inventar um das zu tun.</German>
<Russian>У вас недостаточно места в инвентаре.</Russian>
</Key>
<Key ID="str_player_25">
@@ -344,25 +344,25 @@
<Key ID="str_player_27">
<Original>You have applied a heatpack to your body successfully.</Original>
<English>You have applied a heatpack to your body successfully.</English>
<German>You have applied a heatpack to your body successfully.</German>
<German>Sie haben das Heatpack erfolgreich appliziert</German>
<Russian>Вы успешно применили на вашем теле согревающий комплект.</Russian>
</Key>
<Key ID="str_player_28">
<Original>You cannot reload that combination, you need %1 %2 magazines.</Original>
<English>You cannot reload that combination, you need %1 %2 magazines.</English>
<German>You cannot reload that combination, you need %1 %2 magazines.</German>
<German>Sie können diese Munition nicht kombinieren, sie brauchen %1 %2 Magazine.</German>
<Russian>Вы не можете перезарядить эту комбинацию. Вам необходимо иметь магазины %1 %2.</Russian>
</Key>
<Key ID="str_player_29">
<Original>You have successfully reloaded %1 %2 magazines.</Original>
<English>You have successfully reloaded %1 %2 magazines.</English>
<German>You have successfully reloaded %1 %2 magazines.</German>
<German>Sie haben erfolgreich %1 %2 Magazine hergestellt.</German>
<Russian>Магазины %1 %2 перезаряжены.</Russian>
</Key>
<Key ID="str_player_30">
<Original>%1 must be on your person to move it to/from your toolbelt.</Original>
<English>%1 must be on your person to move it to/from your toolbelt.</English>
<German>%1 must be on your person to move it to/from your toolbelt.</German>
<German>%1 muss in ihrem Inventar sein um es aus/in ihren Werkzeuggürtel zu packen.</German>
<Russian>Для перемещения с/на пояс, предмет %1 должен быть у вас.</Russian>
</Key>
<Key ID="str_player_31">
@@ -374,25 +374,25 @@
<Key ID="str_player_beinglooted">
<Original>%1 is already being looted by someone else.</Original>
<English>%1 is already being looted by someone else.</English>
<German>%1 is already being looted by someone else.</German>
<German>%1 wurde von einer anderen Person gelooted.</German>
<Russian>%1 уже кто-то обыскивает.</Russian>
</Key>
<Key ID="str_player_beingpacked">
<Original>That tent is already being packed.</Original>
<English>That tent is already being packed.</English>
<German>That tent is already being packed.</German>
<German>Dieses Zelt wurde bereits eingepackt.</German>
<Russian>Эту палатку уже упаковывают.</Russian>
</Key>
<Key ID="str_player_studybody">
<Original>His name was %1, it appears he died from %2</Original>
<English>His name was %1, it appears he died from %2</English>
<German>%1 wurde von %2 getötet</German>
<German>Sein Name war %1, er ist durch %2 gestorben</German>
<Russian>Его звали %1, похоже что он умер от %2</Russian>
</Key>
<Key ID="str_death_shothead">
<Original>a gunshot to the head</Original>
<English>a gunshot to the head</English>
<German>ein schuss auf den Kopf</German>
<German>einen Schuss in den Kopf</German>
<Russian>попадания пули в голову</Russian>
</Key>
<Key ID="str_death_shotheavy">
@@ -404,7 +404,7 @@
<Key ID="str_death_bled">
<Original>blood loss</Original>
<English>blood loss</English>
<German>blutverlust</German>
<German>hohen Blutverlust</German>
<Russian>потери крови</Russian>
</Key>
<Key ID="str_death_dehyd">
@@ -428,7 +428,7 @@
<Key ID="str_death_unknown">
<Original>an unknown cause</Original>
<English>an unknown cause</English>
<German>ein unbekannter Grund</German>
<German>einen unbekannten Grund</German>
<Russian>неизвестной причины</Russian>
</Key>
</Package>
@@ -442,7 +442,7 @@
<Key ID="STR_UI_GENDER_DESC">
<Original>Please select the gender you wish to play as. Your gender will be bound to this unique character and cannot be changed until you die.</Original>
<English>Please select the gender you wish to play as. Your gender will be bound to this unique character and cannot be changed until you die.</English>
<German>Bitte wählen Sie das Geschlecht, die Sie als zu spielen. Ihr Geschlecht wird zu dieser einzigartigen Charakter gebunden und kann nicht geändert werden, bis Sie sterben.</German>
<German>Bitte wählen Sie das Geschlecht aus, mit dem sie Spielen wollen. Ihr Geschlecht wird an diesen einzigartigen Charakter gebunden und kann nicht geändert werden, bis sie sterben.</German>
<Russian>Пожалуйста, выберите пол вашего персонажа. Учтите, вы не сможете изменить его в течении игры, до тех пор, пока не погибнете.</Russian>
</Key>
<Key ID="STR_UI_GENDER_MALE">
@@ -516,7 +516,7 @@
<Key ID="str_actions_medical_02">
<Original>Check Pulse</Original>
<English>Check Pulse</English>
<German>Puls fühlen</German>
<German>Puls überprüfen</German>
<Russian>Проверить пульс</Russian>
</Key>
<Key ID="str_actions_medical_03">
@@ -630,9 +630,15 @@
<Key ID="str_actions_save">
<Original>Save %1</Original>
<English>Save %1</English>
<German>% Save</German>
<German>% speichern</German>
<Russian>Сохранить %1</Russian>
</Key>
<Key ID="str_actions_flipveh">
<Original>Turn Over %1</Original>
<English>Turn Over %1</English>
<German>Turn Over %1</German>
<Russian>Turn Over %1</Russian>
</Key>
<Key ID="STR_CHAR_2">
<Original>Bandit</Original>
<English>Bandit</English>

View File

@@ -1,4 +1,4 @@
/*%FSM<COMPILE "D:\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Player Monitor">*/
/*%FSM<COMPILE "F:\DayZ\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Player Monitor">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-75.000000,-350.000000,25.000000,-300.000000,0.000000,"init"};
@@ -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,4346,-75.000000,950.000000,25.000000,1000.000000,0.000000,"Preload" \n "Display"};
item33[] = {"Preload_Display",2,250,-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,250,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"};
item35[] = {"Initialize",2,4346,-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"};
@@ -114,8 +114,8 @@ link56[] = {49,50};
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,934,154,1125,154,3,972};
globals[] = {25.000000,1,0,0,0,640,480,1,81,6316128,1,-536.745972,551.148315,1344.204346,288.206512,955,927,1};
window[] = {2,-1,-1,-32000,-32000,802,22,993,22,3,972};
*//*%FSM</HEAD>*/
class FSM
{
@@ -131,8 +131,9 @@ class FSM
"" \n
"0 fadeSound 0;" \n
"//player setPosATL [-2148,6655,0];" \n
"" \n
"progressLoadingScreen 0.1;" \n
"_timeStart = time;" \n
"player enableSimulation false;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -188,7 +189,9 @@ class FSM
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
"diag_log (""PLOGIN: Initating"");" \n
"" \n
"0 cutText [localize ""str_player_13"", ""BLACK FADED"",60];"/*%FSM</STATEINIT""">*/;
"dayz_loadScreenMsg = (localize ""str_player_13""); " \n
"progressLoadingScreen 0.2;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -200,7 +203,6 @@ class FSM
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!isnil ""bis_fnc_init"""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"dayz_forceSave = {" \n
" //dayzCharSave = [player,dayz_Magazines,true];" \n
"" \n
" createGearDialog [player, ""RscDisplayGear""];" \n
"_dialog = findDisplay 106;" \n
@@ -281,12 +283,8 @@ class FSM
" dayzCharDisco = [dayz_characterID,_playerPos,[weapons player,_magazineArray],[typeOf (unitbackpack player),getWeaponCargo (unitbackpack player),getMagazineCargo (unitbackpack player)],_medical,_currentState,_currentModel];" \n
" //diag_log str(dayzCharDisco); " \n
"" \n
" //publicVariableServer ""dayzCharSave"";" \n
" publicVariableServer ""dayzCharDisco"";" \n
" if (isServer) then {" \n
" //dayzCharSave call server_playerSync;" \n
" dayzCharDisco call server_characterSync;" \n
" };" \n
" // remove isServer from player space" \n
" dayz_lastSave = time;" \n
" dayz_Magazines = [];" \n
"};"/*%FSM</ACTION""">*/;
@@ -322,7 +320,8 @@ class FSM
name = "Collect";
init = /*%FSM<STATEINIT""">*/"diag_log (""PLOGIN: Player Ready"");" \n
"" \n
"0 cutText [""Getting Player ID"", ""BLACK FADED"",60];" \n
"dayz_loadScreenMsg = (localize ""str_player_13""); " \n
"progressLoadingScreen 0.3;" \n
"" \n
"_playerUID = getPlayerUID player;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -392,7 +391,7 @@ class FSM
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
"selectNoPlayer;" \n
"_myTime = time;" \n
"0 cutText [localize ""str_player_14"", ""BLACK FADED"",15];"/*%FSM</STATEINIT""">*/;
"1 cutText [localize ""str_player_14"", ""PLAIN"",15];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -413,19 +412,38 @@ class FSM
class Request
{
name = "Request";
init = /*%FSM<STATEINIT""">*/"startLoadingScreen ["""",""DayZ_loadingScreen""];" \n
init = /*%FSM<STATEINIT""">*/"//startLoadingScreen ["""",""DayZ_loadingScreen""];" \n
"" \n
"diag_log (""PLOGIN: Requesting Authentication... ("" + _playerUID + "")"");" \n
"0 cutText [localize ""str_player_15"", ""BLACK FADED"",60];" \n
"dayz_loadScreenMsg = (localize ""str_player_15"");" \n
"progressLoadingScreen 0.5;" \n
"" \n
"_msg = [];" \n
"" \n
"dayzLogin = [_playerUID,player];" \n
"dayzPlayerLogin = [];" \n
"publicVariableServer ""dayzLogin"";" \n
"if (isServer) then {" \n
" dayzLogin call server_playerLogin;" \n
"};"/*%FSM</STATEINIT""">*/;
"penaltyTimeout = true;" \n
"" \n
"[] spawn {" \n
" private[""_doLoop""];" \n
" _doLoop = 0;" \n
" sleep 1;" \n
"" \n
" while { penaltyTimeout && _doLoop < 60 } do {" \n
"// diag_log ""DEBUG: penalty timeout running.""; " \n
" _doLoop=_doLoop + 1;" \n
"// TODO: localize this msg " \n
" dayz_loadScreenMsg = format[""Combatmode timeout: %1"",_doLoop]; " \n
" progressLoadingScreen (_doLoop/60);" \n
" sleep 1;" \n
" };" \n
" dayz_loadScreenMsg = "" ""; " \n
"};" \n
"" \n
"" \n
"// remove isServer from player space" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -446,7 +464,8 @@ class FSM
class Parse_Login
{
name = "Parse_Login";
init = /*%FSM<STATEINIT""">*/"_charID = _msg select 0;" \n
init = /*%FSM<STATEINIT""">*/"progressLoadingScreen 0.6;" \n
"_charID = _msg select 0;" \n
"_inventory = _msg select 1;" \n
"_backpack = _msg select 2;" \n
"_survival = _msg select 3;" \n
@@ -464,7 +483,8 @@ class FSM
" diag_log (""PLAYER RESULT: "" + str(_isHiveOk));" \n
"};" \n
"" \n
"0 cutText [localize ""str_player_17"", ""BLACK FADED"",60];" \n
"dayz_loadScreenMsg = (localize ""str_player_17""); " \n
"progressLoadingScreen 0.7;" \n
"diag_log (""PLOGIN: authenticated with : "" + str(_msg));" \n
"" \n
"//Not Equal Failure" \n
@@ -531,7 +551,7 @@ class FSM
"selectNoPlayer;" \n
"" \n
"_myTime = time;" \n
"0 cutText [""This server is running an incorrect version of the server side application. You cannot play on this server. If you are the server admin please contact DayZ staff."", ""BLACK FADED"",5];"/*%FSM</STATEINIT""">*/;
"1 cutText [""This server is running an incorrect version of the server side application. You cannot play on this server. If you are the server admin please contact DayZ staff."", ""PLAIN"",5];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -633,12 +653,11 @@ class FSM
"" \n
"dayzPlayerLogin2 = [];" \n
"dayzLogin2 = [_charID,player,_playerUID];" \n
"publicVariable ""dayzLogin2"";" \n
"if (isServer) then {" \n
" dayzLogin2 spawn server_playerSetup;" \n
"};" \n
"publicVariableServer ""dayzLogin2"";" \n
"// remove isServer from player space" \n
"" \n
"0 cutText [""Requesting Character data from server"", ""BLACK FADED"",60];" \n
"dayz_loadScreenMsg = ""Requesting Character data from server"";" \n
"progressLoadingScreen 0.8;" \n
"diag_log ""Attempting Phase two..."";"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -660,7 +679,7 @@ class FSM
class Phase_Two
{
name = "Phase_Two";
init = /*%FSM<STATEINIT""">*/"0 cutText [""Character Data received from server"", ""BLACK FADED"",60];" \n
init = /*%FSM<STATEINIT""">*/"dayz_loadScreenMsg = ""Character Data received from server""; " \n
"diag_log ""Finished..."";" \n
"" \n
"_worldspace = dayzPlayerLogin2 select 0;" \n
@@ -808,12 +827,12 @@ class FSM
class Position
{
name = "Position";
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
"startLoadingScreen ["""",""DayZ_loadingScreen""];" \n
init = /*%FSM<STATEINIT""">*/"" \n
"//Location" \n
"_myLoc = getPosATL player;" \n
"" \n
"0 cutText [""Setup Completed, please wait..."", ""BLACK FADED"",60];" \n
"dayz_loadScreenMsg = ""Setup Completed, please wait..."";" \n
"progressLoadingScreen 0.9;" \n
"" \n
"//GUI" \n
"3 cutRsc [""playerStatusGUI"", ""PLAIN"",0];" \n
@@ -873,7 +892,7 @@ class FSM
"" \n
"dayz_clientPreload = true;" \n
"3 fadeSound 1;" \n
"0 cutText ["""", ""BLACK IN"", 3];" \n
"1 cutText ["""", ""PLAIN""];" \n
"0 fadeMusic 0.5;" \n
"" \n
"//Check mission objects" \n
@@ -902,7 +921,7 @@ class FSM
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
"selectNoPlayer;" \n
"_myTime = time;" \n
"cutText [format[localize ""str_player_18"",dayz_versionNo,_version], ""BLACK""];"/*%FSM</STATEINIT""">*/;
"1 cutText [format[localize ""str_player_18"",dayz_versionNo,_version], ""PLAIN""];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -1012,7 +1031,9 @@ class FSM
class Initialize
{
name = "Initialize";
init = /*%FSM<STATEINIT""">*/"//Medical" \n
init = /*%FSM<STATEINIT""">*/"#define ods(arg1) ""armaperflib"" callextension arg1" \n
"" \n
"//Medical" \n
"dayz_medicalH = [] execVM ""\z\addons\dayz_code\medical\init_medical.sqf""; //Medical Monitor Script (client only)" \n
"[player] call fnc_usec_damageHandle;" \n
"if (r_player_unconscious) then {" \n
@@ -1020,6 +1041,8 @@ class FSM
" player playActionNow ""Die"";" \n
"};" \n
"player allowDamage true;" \n
"player enableSimulation true;" \n
"0 cutText ["""", ""BLACK IN"",3];" \n
"" \n
"//Add core tools" \n
"player addWeapon ""Loot"";" \n
@@ -1046,6 +1069,7 @@ class FSM
" _array = player call world_surfaceNoise;" \n
" dayz_surfaceNoise = _array select 1;" \n
" dayz_surfaceType = _array select 0;" \n
"" \n
" call player_checkStealth;" \n
" dayz_statusArray = [] call player_updateGui;" \n
" if (!isNull cursorTarget and !dayz_heartBeat) then {" \n
@@ -1082,12 +1106,16 @@ class FSM
" _charID = _this select 1;" \n
" _runOnce = false;" \n
" while {true} do {" \n
" _handle = [false] spawn player_spawnCheck;" \n
" waitUntil{scriptDone _handle};" \n
"" \n
" ods(""dayz_lootCheck"");" \n
"" \n
" call player_spawnCheck; " \n
"" \n
" call stream_locationCheck;" \n
" sleep 2;" \n
" sleep 10;" \n
" };" \n
"};" \n
"// TODO: questionably" \n
"{ _x call fnc_vehicleEventHandler; } forEach vehicles;" \n
"{ nul = [_x,2,0,false,false] spawn BIS_Effects_Burn; } forEach allMissionObjects ""UH1Wreck_DZ"";" \n
""/*%FSM</STATEINIT""">*/;
@@ -1127,7 +1155,7 @@ class FSM
{
name = "Enable_Sim";
init = /*%FSM<STATEINIT""">*/"_myAnim = getNumber(configFile >> ""CfgPatches"" >> ""dayz_anim"" >> ""isUpdated"");" \n
"player enableSimulation true;"/*%FSM</STATEINIT""">*/;
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -1159,8 +1187,8 @@ class FSM
{
name = "Gender_Selection";
init = /*%FSM<STATEINIT""">*/"dayz_selectGender = ""Survivor2_DZ"";" \n
"1 cutText ["""", ""BLACK"",0];" \n
"endLoadingScreen;" \n
"0 cutText ["""", ""BLACK FADED"",60];" \n
"createDialog ""RscDisplayGenderSelect"";"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -1206,7 +1234,7 @@ class FSM
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
"selectNoPlayer;" \n
"_myTime = time;" \n
"0 cutText [""You have an outdated version of 'dayz_anim' please download the correct version"", ""BLACK FADED"",15];"/*%FSM</STATEINIT""">*/;
"1 cutText [""You have an outdated version of 'dayz_anim' please download the correct version"", ""PLAIN"",15];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -1233,7 +1261,7 @@ class FSM
"_zombies = (getPosATL player) nearEntities [""zZombie_Base"",30];" \n
"{deleteVehicle _x} forEach _zombies;" \n
"" \n
"endLoadingScreen;"/*%FSM</STATEINIT""">*/;
"//endLoadingScreen;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{

View File

@@ -134,8 +134,8 @@ link71[] = {54,32};
link72[] = {55,7};
link73[] = {56,3};
link74[] = {57,1};
globals[] = {25.000000,1,0,0,0,640,480,1,97,6316128,1,-848.842712,436.361816,737.753784,-47.213638,984,601,1};
window[] = {2,-1,-1,-1,-1,802,22,1230,22,3,1001};
globals[] = {25.000000,1,0,0,0,640,480,1,97,6316128,1,-662.298340,610.054138,759.015137,-18.102575,984,601,1};
window[] = {2,-1,-1,-1,-1,846,66,1274,66,3,1001};
*//*%FSM</HEAD>*/
class FSM
{
@@ -467,7 +467,7 @@ class FSM
"" \n
"//Move to target" \n
"_agent moveTo _targetPos;" \n
"_agent forceSpeed 5;" \n
"_agent forceSpeed 6;" \n
"" \n
"//Check if LOS" \n
"if (_losCheck == 2) then {" \n

View File

@@ -0,0 +1,140 @@
/***********************************************************
most of the code is taken from fn_damageHandler.sqf
PROCESS DAMAGE TO A BOT
- Function
- [unit, selectionName, damage, source, projectile] call disco_damageHandler;
************************************************************/
private["_unit","_hit","_damage","_unconscious","_source","_ammo","_type","_isMinor","_isHeadHit","_inVehicle","_isPlayer",
"_humanityHit","_myKills","_characterID","_player_blood","_method"];
_unit = _this select 0;
_hit = _this select 1;
_damage = _this select 2;
_unconscious = _unit getVariable ["NORRN_unconscious", false];
_source = _this select 3;
_ammo = _this select 4;
_type = [_damage,_ammo] call fnc_usec_damageType;
_isMinor = (_hit in USEC_MinorWounds);
_isHeadHit = (_hit == "head_hit");
_inVehicle = (vehicle _unit != _unit);
_isPlayer = (isPlayer _source);
_humanityHit = 0;
_myKills = 0;
_characterID = _unit getVariable["CharacterID","0"];
_player_blood = _unit getVariable["USEC_BloodQty",12000];
_method = "";
private["_strH","_dam","_total","_totalDmg"];
_strH = "hit_" + (_hit);
_dam = _unit getVariable [_strH,0];
if ( _dam > 1 ) then { _dam = 1 };
// total damage for part
_total = _dam + _damage;
_unit setVariable [_strH,_total,true];
if (_characterID == "0") exitWith
{
diag_log "DEBUG: disco_damageHandler: CharacterID is 0";
};
// calculate damage for all parts
_totalDmg = 0;
{
_strH = "hit_" + _x;
_dam = _unit getVariable[_strH,0];
_totalDmg = _totalDmg + _dam;
} forEach USEC_woundHit;
private["_scale"];
//PVP Damage
_scale = 200;
if (_total > 0.4) then {
// maybe need to tune _scale value, 850 as in original
_scale = _scale + 850;
if (_isHeadHit) then {
_scale = _scale + 500;
};
// seems need different scale for type 1,2
switch (_type) do {
case 1: {_scale = _scale + 200};
case 2: {_scale = _scale + 200};
};
//Cause blood loss
_player_blood = _player_blood - (_total * _scale);
};
//Record Damage to Minor parts (legs, arms)
if ( (_hit == "legs") && (_total == 1) ) then { _unit setVariable ["hit_legs",1,true]; };
if ( (_hit == "hands") && (_total == 1) ) then { _unit setVariable ["hit_hands",1,true]; };
private["_wound","_isHit","_rndPain","_isInjured","_rndInfection","_rndPain","_hitPain","_inPain","_hitInfection"];
// common damage first
if (_totalDmg > 4) then {
if ( _type == 0 ) then {
// TODO: add appropriate _method and message when study
_method = "unknown";
};
if ( _type == 1 ) then {
//TODO: add message when study
_method = "explosion";
};
if ( _type == 2 ) then {
//serious ballistic damage
_method = "shotheavy";
};
};
if ((_total > 1) and _isHeadHit) then {
// head hit
_method = "shothead";
};
if ( _player_blood < 50 ) then {
// blood loss
_method = "bleed";
};
if ( _method !="" ) then {
// process death
[_unit,_source,_method] spawn disco_playerDeath;
} else {
// still alive?
if (_total > 0.4) then { //0.25
/* BLEEDING */
_wound = _hit call fnc_usec_damageGetWound;
_isHit = _unit getVariable[_wound,false];
// diag_log format["DEBUG: wound:%1 [%2]",_wound,_isHit];
_rndPain = (random 10);
_rndInfection = (random 1000);
_hitPain = (_rndPain < _total);
if (_isHeadHit or _hitPain) then {
_hitPain = true;
};
_hitInfection = (_rndInfection < 1);
if (_isHit) then {
//Make hit worse
_player_blood = _player_blood - 50;
};
if (_hitInfection) then {
//Set Infection if not already
_unit setVariable["USEC_infected",true,true];
};
if (_hitPain) then {
//Set Pain if not already
_unit setVariable["USEC_inPain",true,true];
};
};
private["_isInjured"];
if(!_isHit) then {
//Create Wound
// diag_log format["DEBUG: spawn bleed %1",_wound];
_unit setVariable[_wound,true,true];
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
usecBleed = [_unit,_wound,_hit];
publicVariable "usecBleed";
//Set Injured if not already
_isInjured = _unit getVariable["USEC_injured",false];
if (!_isInjured) then {
_unit setVariable["USEC_injured",true,true];
};
};
_unit setVariable["USEC_BloodQty",_player_blood,true];
};

View File

@@ -0,0 +1,54 @@
/*
[_object,_source,_method] spawn disco_playerDeath;
*/
private["_object","_source","_method","_key","_playerID","_characterID","_playerName","_isDead"];
_object = _this select 0;
_source = _this select 1;
_method = _this select 2;
_playerID = _object getVariable["playerID","0"]; //playerUID
_characterID = _object getVariable["characterID","0"]; //characterID
_playerName = _object getVariable["bodyName","unknown"];
_isDead = _object getVariable["USEC_isDead",false];
_humanity = 0;
_wait = 0;
_object removeAllEventHandlers "HandleDamage";
if (!_isDead) then {
_id = [_characterID,0,_object,_playerID,_playerName,_source,_method] spawn server_playerDied;
_object setDamage 1;
_object setVariable["USEC_isDead",true,true];
dayzFlies = _object;
publicVariable "dayzFlies";
_id = [_object,50,true,getPosATL _object] spawn player_alertZombies;
private["_canHitFree","_isBandit","_myKills","_humanity","_killsH","_wait","_killsB"];
if (!isNull _source) then {
if (_source != _object) then {
_canHitFree = _object getVariable ["freeTarget",false];
_isBandit = (typeOf _object) == "Bandit1_DZ";
_myKills = ((_object getVariable ["humanKills",0]) / 30) * 1000;
if (!_canHitFree and !_isBandit) then {
//Process Morality Hit
_humanity = -(2000 - _myKills);
_killsH = _source getVariable ["humanKills",0];
_source setVariable ["humanKills",(_killsH + 1),true];
_wait = 300;
} else {
//Process Morality Hit
//_humanity = _myKills * 100;
_killsB = _source getVariable ["banditKills",0];
_source setVariable ["banditKills",(_killsB + 1),true];
_wait = 0;
};
if (_humanity < 0) then {
_wait = 0;
};
if (!_canHitFree and !_isBandit) then {
dayzHumanity = [_source,_humanity,_wait];
publicVariable "dayzHumanity";
};
};
};
_object setVariable ["deathType",_method,true];
};

View File

@@ -0,0 +1,218 @@
/*
[_object,_playerID,_characterID,_penalty] spawn disco_playerMorph;
*/
private["_object","_playerID","_characterID","_playerName","_model","_position","_dir","_currentAnim","_penalty"];
_object = _this select 0;
// TODO: check
_playerID = _this select 1; //playerUID
_characterID = _this select 2; //characterID
_penalty = _this select 3;
_playerName = _object getVariable["bodyName","unknown"]; //name _object;
_model = typeOf _object;
_position = getPosATL _object;
_dir = getDir _object;
_currentAnim = animationState _object;
_object removeAllEventHandlers "FiredNear";
_object removeAllEventHandlers "HandleDamage";
_object removeAllEventHandlers "Killed";
_object removeAllEventHandlers "Fired";
private["_updates","_humanity","_legs","_arms","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_banditKills","_temp"];
// TODO: check
_updates = _object getVariable["updatePlayer",[false,false,false,false,false]];
_updates set [0,true];
_object setVariable["updatePlayer",_updates,true];
_humanity = _object getVariable["humanity",0];
_temp = round(_object getVariable ["temperature",100]);
_worldspace = [round(_dir),_position];
_zombieKills = _object getVariable ["zombieKills",0];
_headShots = _object getVariable ["headShots",0];
_humanKills = _object getVariable ["humanKills",0];
_banditKills = _object getVariable ["banditKills",0];
_medical = _object call player_sumMedical;
_messing = _object getVariable ["messing",[0,0]];
//BackUp Weapons and Mags
private ["_weapons","_magazines","_primweapon","_secweapon"];
_weapons = weapons _object;
_magazines = magazines _object;
_primweapon = primaryWeapon _object;
_secweapon = secondaryWeapon _object;
//Checks
if(!(_primweapon in _weapons) && _primweapon != "") then {
_weapons = _weapons + [_primweapon];
};
if(!(_secweapon in _weapons) && _secweapon != "") then {
_weapons = _weapons + [_secweapon];
};
if(count _magazines == 0) then {
_magazines = magazines _object;
};
//BackUp Backpack
private ["_newBackpackType","_backpackWpn","_backpackMag"];
_newBackpackType = typeOf (unitBackpack _object);
if(_newBackpackType != "") then {
_backpackWpn = getWeaponCargo unitBackpack _object;
_backpackMag = getMagazineCargo unitBackpack _object;
};
//Get Muzzle
private ["_currentWpn","_muzzles"];
_currentWpn = "";
_muzzles = getArray(configFile >> "cfgWeapons" >> _currentWpn >> "muzzles");
if (count _muzzles > 1) then {
_currentWpn = currentMuzzle _object;
};
private ["_primary"];
_doLoop = 0;
while {_doLoop < 5} do {
_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
_primary = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
if (count _primary > 0) then {
if ((_primary select 0) != "ERROR") then {
_doLoop = 9;
};
};
_doLoop = _doLoop + 1;
};
private ["_group","_newUnit"];
// get ammo from DB
_magazines = (_primary select 4) select 1;
//Create New Character
_group = createGroup civilian;
_newUnit = _group createUnit [_model,[0,0,0],[],0,"NONE"];
sleep 0.1;
//Clear New Character
{_newUnit removeMagazine _x;} forEach (magazines _newUnit);
removeAllWeapons _newUnit;
//Equip New Charactar
{ _newUnit addMagazine _x } forEach _magazines;
{ _newUnit addWeapon _x } forEach _weapons;
if(_primweapon != (primaryWeapon _newUnit)) then { _newUnit addWeapon _primweapon };
if(_secweapon != (secondaryWeapon _newUnit) && _secweapon != "") then { _newUnit addWeapon _secweapon };
//Add and Fill BackPack
private["_newBackpack","_countr","_backpackmagTypes","_backpackmagQtys"];
if (!isNil "_newBackpackType") then {
if (_newBackpackType != "") then {
_newUnit addBackpack _newBackpackType;
_newBackpack = unitBackpack _newUnit;
//Fill backpack contents
//Weapons
_backpackWpnTypes = [];
_backpackWpnQtys = [];
if (count _backpackWpn > 0) then {
_backpackWpnTypes = _backpackWpn select 0;
_backpackWpnQtys = _backpackWpn select 1;
};
_countr = 0;
{
_newBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
_countr = _countr + 1;
} forEach _backpackWpnTypes;
//magazines
_backpackmagTypes = [];
_backpackmagQtys = [];
if (count _backpackmag > 0) then {
_backpackmagTypes = _backpackMag select 0;
_backpackmagQtys = _backpackMag select 1;
};
_countr = 0;
{
_newBackpack addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
_countr = _countr + 1;
} forEach _backpackmagTypes;
};
};
//set medical values
private["_fractures"];
if (count _medical > 0) then {
_newUnit setVariable["USEC_isDead",(_medical select 0),true];
_newUnit setVariable["NORRN_unconscious", (_medical select 1), true];
_newUnit setVariable["USEC_infected",(_medical select 2),true];
_newUnit setVariable["USEC_injured",(_medical select 3),true];
_newUnit setVariable["USEC_inPain",(_medical select 4),true];
_newUnit setVariable["USEC_isCardiac",(_medical select 5),true];
_newUnit setVariable["USEC_lowBlood",(_medical select 6),true];
_newUnit setVariable["USEC_BloodQty",(_medical select 7),true];
_newUnit setVariable["unconsciousTime",(_medical select 10),true];
//Add Wounds
{
_newUnit setVariable[_x,true,true];
[_newUnit,_x,0] spawn fnc_usec_damageBleed;
usecBleed = [_newUnit,_x,0];
publicVariable "usecBleed";
} forEach (_medical select 8);
//Add fractures
_fractures = (_medical select 9);
_newUnit setVariable ["hit_legs",(_fractures select 0),true];
_newUnit setVariable ["hit_hands",(_fractures select 1),true];
} else {
//Reset Fractures
_newUnit setVariable ["hit_legs",0,true];
_newUnit setVariable ["hit_hands",0,true];
_newUnit setVariable ["USEC_injured",false,true];
_newUnit setVariable ["USEC_inPain",false,true];
};
//General Stats
_newUnit setVariable["characterID",_characterID,true];
_newUnit setVariable["worldspace",_worldspace,true];
_newUnit setVariable["bodyName",_playerName,true];
//_newUnit setVariable["playerID",_playerID,true];
_newUnit setVariable["temperature",_temp,true];
_newUnit setVariable["messing",_messing,true];
//Move to position
_newUnit allowDamage true;
deleteVehicle _object;
deleteGroup (group _object);
_newUnit setDir _dir;
_newUnit setPosATL _position;
_newUnit playActionNow "Die";
_newUnit disableConversation true;
_newUnit setCaptive false;
// _newUnit disableAi "ANIM";
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
//_newUnit addWeapon "Loot";
//_newUnit addWeapon "Flare";
botPlayers = botPlayers + [_playerID];
private["_mydamage_eh1"];
_mydamage_eh1 = _newUnit addeventhandler ["HandleDamage",{ _this call disco_damageHandler;0 }];
diag_log format["DEBUG: Player %1 [%2] added to botPlayers: %3",_playerName,_playerID,botPlayers];
private["_doLoop","_isDead"];
_isDead = _newUnit getVariable["USEC_isDead",false];
_doLoop = 0;
while { _doLoop < _penalty && !_isDead } do {
_isDead = _newUnit getVariable["USEC_isDead",false];
_doLoop = _doLoop + 1;
sleep 1;
};
_newUnit removeAllEventHandlers "handleDamage";
if (!_isDead) then {
private["_playerBackp"];
_medical = _newUnit call player_sumMedical;
_newBackpack = unitBackpack _newUnit;
_playerBackp = [typeOf _newBackpack,getWeaponCargo _newBackpack,getMagazineCargo _newBackpack];
// _group = group _newUnit;
deleteVehicle _newUnit;
deleteGroup _group;
//Send to HIVE backpack and medical only
[_characterID,_worldspace,[],_playerBackp,_medical,[],""] call server_characterSync;
};
botPlayers = botPlayers - [_playerID];
diag_log format["DEBUG: Player %1 [%2] removed from botPlayers: %3",_playerName,_playerID,botPlayers];

View File

@@ -15,14 +15,9 @@ if (vehicle _object != _object) then {
_object action ["eject", vehicle _object];
};
if (59 in _playerIDtoarray) exitWith { diag_log ("Exited"); };
if (59 in _playerIDtoarray) exitWith { };
if ((_timeout - time) > 0) then {
//_playerName call player_combatLogged;
private["_playerName","_center","_group"];
_playerName = name player;
_timeout = _object getVariable["combattimeout",0];
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
};
@@ -35,6 +30,10 @@ if (!isNull _object) then {
(nearestObjects [getPosATL _object, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage"], 10]);
if (alive _object) then {
[_object,[],true] call server_playerSync;
if ((_timeout - time) > 0) then {
// spawn bot, if player in combat mode
[_object,_playerID,_characterID,30] spawn disco_playerMorph;
};
_id = [_playerID,_characterID,2] spawn dayz_recordLogin;
_myGroup = group _object;
deleteVehicle _object;

View File

@@ -1,4 +1,4 @@
private["_int","_newModel","_doLoop","_wait","_hiveVer","_isHiveOk","_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"];
private["_botActive","_int","_newModel","_doLoop","_wait","_hiveVer","_isHiveOk","_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
diag_log ("STARTING LOGIN: " + str(_this));
@@ -27,6 +27,7 @@ _state = [];
_direction = 0;
_model = "";
_newUnit = objNull;
_botActive = false;
if (_playerID == "") then {
_playerID = getPlayerUID _playerObj;
@@ -35,8 +36,14 @@ if (_playerID == "") then {
if ((_playerID == "") or (isNil "_playerID")) exitWith {
diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
};
// spawn a waituntil if bot still on server, then run server_playerLogin later again
_botActive = _playerID in botPlayers;
if (_botActive) then { _this spawn server_waitForBotFinished;};
if (_botActive) exitWith{};
penaltyTimeout = false;
(owner _playerObj) publicVariableClient "penaltyTimeout";
endLoadingScreen;
//??? endLoadingScreen;
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
//Do Connection Attempt
@@ -103,7 +110,7 @@ if (!_isNew) then {
//Wait for HIVE to be free
_key = format["CHILD:203:%1:%2:%3:",_charID,[_wpns,_mags],[_bcpk,[],[]]];
_key spawn server_hiveWrite;
_key call server_hiveWrite;
};
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
@@ -117,8 +124,5 @@ if (_hiveVer >= dayz_hiveVersionNo) then {
//Server publishes variable to clients and WAITS
//_playerObj setVariable ["publish",[_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer],true];
_clientID = owner _playerObj;
dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer];
_clientID publicVariableClient "dayzPlayerLogin";
//_playerObj enableSimulation false;
(owner _playerObj) publicVariableClient "dayzPlayerLogin";

View File

@@ -1,4 +1,4 @@
private ["_characterID","_doLoop","_playerID","_playerObj","_randomSpot","_primary","_key","_worldspace","_score","_position","_pos","_isIsland","_medical","_stats","_state","_dummy","_debug","_distance","_hit","_fractures","_w","_findSpot","_humanity","_clientID","_lastinstance"];
private["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_lastinstance","_randomSpot","_position","_debug","_distance","_hit","_fractures","_score","_findSpot","_mkr","_counter","_isNear","_isZero","_pos","_isIsland","_w","_clientID"];
//Wait for HIVE to be free
//diag_log ("SETUP: attempted with " + str(_this));

View File

@@ -1,4 +1,4 @@
private ["_characterID","_temp","_currentWpn","_magazines","_force","_isNewPos","_humanity","_isNewGear","_currentModel","_modelChk","_playerPos","_playerGear","_playerBackp","_backpack","_killsB","_killsH","_medical","_isNewMed","_character","_timeSince","_charPos","_isInVehicle","_distanceFoot","_lastPos","_kills","_headShots","_timeGross","_timeLeft","_onLadder","_isTerminal","_currentAnim","_muzzles","_array","_key","_lastTime","_config","_currentState","_pos"];
private["_character","_magazines","_force","_characterID","_charPos","_isInVehicle","_timeSince","_humanity","_debug","_distance","_isNewMed","_isNewPos","_isNewGear","_playerPos","_playerGear","_playerBackp","_medical","_distanceFoot","_lastPos","_backpack","_kills","_killsB","_killsH","_headShots","_lastTime","_timeGross","_timeLeft","_currentWpn","_currentAnim","_config","_onLadder","_isTerminal","_wpnDisabled","_currentModel","_modelChk","_muzzles","_temp","_currentState","_array","_key","_pos"];
//[player,array]
//diag_log ("UPDATE: " + str(_this) );

View File

@@ -5,10 +5,12 @@ _object = _this select 1;
_worldspace = _this select 2;
_class = _this select 3;
if (!(_object isKindOf "Building")) exitWith {
deleteVehicle _object;
};
_allowed = [_object] call check_publishobject;
if (!_allowed) exitWith { };
//diag_log ("PUBLISH: Attempt " + str(_object));

View File

@@ -82,6 +82,7 @@ _object_damage = {
_hit = [_object,_x] call object_getHit;
_selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
_object setHit ["_selection", _hit]
} forEach _hitpoints;
_key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
diag_log ("HIVE: WRITE: "+ str(_key));

View File

@@ -1,5 +1,11 @@
waituntil {!isnil "bis_fnc_init"};
BIS_MPF_remoteExecutionServer = {
if ((_this select 1) select 2 == "JIPrequest") then {
[nil,(_this select 1) select 0,"loc",rJIPEXEC,[any,any,"per","execVM","ca\Modules\Functions\init.sqf"]] call RE;
};
};
BIS_Effects_Burn = {};
object_spawnDamVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_spawnDamVehicle.sqf";
server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
@@ -15,8 +21,17 @@ local_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\comp
local_createObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_createObj.sqf"; //Creates the object in DB
server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
//server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
disco_playerMorph = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\disco_playerMorph.sqf";
disco_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\disco_damageHandler.sqf";
disco_playerDeath = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\disco_playerDeath.sqf";
server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
server_waitForBotFinished = {
private ["_playerId"];
_playerID = _this select 0;
waituntil{sleep 1; !(_playerID in botPlayers)};
_this call server_playerLogin;
};
vehicle_handleInteract = {
private["_object"];
@@ -24,8 +39,26 @@ vehicle_handleInteract = {
[_object, "all"] call server_updateObject;
};
player_combatLogged = {
check_publishobject = {
private["_allowed","_allowedObjects","_object"];
_object = _this select 0;
_allowedObjects = ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Wire_cat1"];
_noncombatitems = ["ThrownObjects", "RoadFlare", "ChemLight"];
_allowed = false;
diag_log format ["DEBUG: Checking if Object: %1 is allowed", _object];
if ((typeOf _object) in _allowedObjects) then {
diag_log format ["DEBUG: Object: %1 Safe",_object];
_allowed = true;
};
if ((typeOf _object) in _noncombatitems) then {
diag_log format ["DEBUG: NONCombat: %1 Safe",_object];
_allowed = true;
};
_allowed;
};
//event Handlers
@@ -37,7 +70,21 @@ eh_localCleanup = {
private["_type","_unit"];
_unit = _this select 0;
_type = typeOf _unit;
_myGroupUnit = group _unit;
_unit removeAllMPEventHandlers "mpkilled";
_unit removeAllMPEventHandlers "mphit";
_unit removeAllMPEventHandlers "mprespawn";
_unit removeAllEventHandlers "FiredNear";
_unit removeAllEventHandlers "HandleDamage";
_unit removeAllEventHandlers "Killed";
_unit removeAllEventHandlers "Fired";
_unit removeAllEventHandlers "GetOut";
_unit removeAllEventHandlers "GetIn";
_unit removeAllEventHandlers "Local";
clearVehicleInit _unit;
deleteVehicle _unit;
deleteGroup _myGroupUnit;
_unit = nil;
diag_log ("CLEANUP: DELETED A " + str(_type) );
};
}];

View File

@@ -4,30 +4,29 @@
item0[] = {"init",0,250,-75.000000,-400.000000,25.000000,-350.000000,0.000000,"init"};
item1[] = {"true",8,218,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"true"};
item2[] = {"waiting",2,250,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"waiting"};
item3[] = {"too_many_dead",4,218,-150.000000,-25.000000,-50.000000,25.000000,2.000000,"too many" \n "dead"};
item4[] = {"cleanup_dead",2,250,-150.000000,50.000000,-50.000000,100.000000,0.000000,"cleanup" \n "dead"};
item5[] = {"too_many_objects",4,218,-25.000000,-25.000000,75.000000,25.000000,0.000000,"too many" \n "objects"};
item6[] = {"cleanup_objects",2,250,-25.000000,50.000000,75.000000,100.000000,0.000000,"cleanup" \n "objects"};
item7[] = {"time_sync",4,218,-275.000000,-25.000000,-175.000000,25.000000,1.000000,"time" \n "sync"};
item8[] = {"sync_the_time",2,250,-275.000000,50.000000,-175.000000,100.000000,0.000000,"sync" \n "the time"};
item3[] = {"time_dead",4,218,-300.000000,-25.000000,-200.000000,25.000000,4.000000,"time" \n "dead"};
item4[] = {"cleanup_dead",2,250,-300.000000,50.000000,-200.000000,100.000000,0.000000,"cleanup" \n "dead"};
item5[] = {"time_items",4,218,0.000000,-25.000000,100.000000,25.000000,2.000000,"time" \n "items"};
item6[] = {"cleanup_items",2,250,0.000000,50.000000,100.000000,100.000000,0.000000,"cleanup" \n "items"};
item7[] = {"time_sync",4,218,-150.000000,-25.000000,-50.000000,25.000000,3.000000,"time" \n "sync"};
item8[] = {"sync_the_time",2,250,-150.000000,50.000000,-50.000000,100.000000,0.000000,"sync" \n "the time"};
item9[] = {"true",8,218,-75.000000,125.000000,25.000000,175.000000,0.000000,"true"};
item10[] = {"general_cleanup",2,250,-75.000000,200.000000,25.000000,250.000000,0.000000,"general" \n "cleanup"};
item11[] = {"",7,210,-304.000000,220.999985,-296.000000,229.000015,0.000000,""};
item12[] = {"",7,210,-304.000000,-154.000000,-296.000000,-146.000000,0.000000,""};
item13[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
item14[] = {"",7,210,221.000000,146.000000,229.000000,154.000000,0.000000,""};
item15[] = {"initialized",4,218,-75.000000,-325.000000,25.000000,-275.000000,0.000000,"initialized"};
item16[] = {"prepare",2,250,-75.000000,-250.000000,25.000000,-200.000000,0.000000,"prepare"};
item17[] = {"update_objects",2,4346,100.000000,50.000000,200.000000,100.000000,0.000000,"update objects"};
item18[] = {"need_update",4,218,100.000000,-25.000000,200.000000,25.000000,1.000000,"need update"};
item19[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
link0[] = {0,15};
item11[] = {"",7,210,-341.500000,220.999985,-333.500000,229.000015,0.000000,""};
item12[] = {"",7,210,-341.500000,-154.000000,-333.500000,-146.000000,0.000000,""};
item13[] = {"initialized",4,218,-75.000000,-325.000000,25.000000,-275.000000,0.000000,"initialized"};
item14[] = {"prepare",2,250,-75.000000,-250.000000,25.000000,-200.000000,0.000000,"prepare"};
item15[] = {"update_objects",2,250,150.000000,50.000000,250.000000,100.000000,0.000000,"update objects"};
item16[] = {"time_obj_update",4,218,150.000000,-25.000000,250.000000,25.000000,1.000000,"time" \n "obj update"};
item17[] = {"anti_hack",4,218,150.000000,-100.000000,250.000000,-50.000000,0.000000,"anti hack"};
item18[] = {"check_for_hacker",2,4346,150.000000,-175.000000,250.000000,-125.000000,0.000000,"check for" \n "hackers"};
link0[] = {0,13};
link1[] = {1,2};
link2[] = {2,3};
link3[] = {2,5};
link4[] = {2,7};
link5[] = {2,13};
link6[] = {2,18};
link5[] = {2,16};
link6[] = {2,17};
link7[] = {3,4};
link8[] = {4,9};
link9[] = {5,6};
@@ -39,14 +38,13 @@ link14[] = {10,11};
link15[] = {11,12};
link16[] = {12,1};
link17[] = {13,14};
link18[] = {13,19};
link19[] = {14,9};
link20[] = {15,16};
link21[] = {16,1};
link22[] = {17,9};
link23[] = {18,17};
globals[] = {25.000000,1,0,0,0,640,480,1,24,6316128,1,-396.580658,354.272186,463.204498,-386.553192,911,1031,1};
window[] = {2,-1,-1,-1,-1,1020,322,1651,78,3,929};
link18[] = {14,1};
link19[] = {15,9};
link20[] = {16,15};
link21[] = {17,18};
link22[] = {18,1};
globals[] = {25.000000,1,0,0,0,640,480,1,33,6316128,1,-380.893097,315.695129,343.738464,-460.417511,803,927,1};
window[] = {2,-1,-1,-1,-1,1039,132,1246,132,3,820};
*//*%FSM</HEAD>*/
class FSM
{
@@ -78,60 +76,58 @@ class FSM
class waiting
{
name = "waiting";
init = /*%FSM<STATEINIT""">*/"//diag_log ""CLEANUP: Waiting for next task"";" \n
"_numDead = {local _x} count allDead;" \n
""/*%FSM</STATEINIT""">*/;
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "too_many_dead">*/
class too_many_dead
/*%FSM<LINK "time_dead">*/
class time_dead
{
priority = 2.000000;
priority = 4.000000;
to="cleanup_dead";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(_numDead > 300)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _lastDeadCheck) > 600"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastDeadCheck = time;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "time_sync">*/
class time_sync
{
priority = 1.000000;
priority = 3.000000;
to="sync_the_time";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((time - _lastUpdate) > 300)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastUpdate = time;"/*%FSM</ACTION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _lastTimeSync) > 300"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastTimeSync = time;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "need_update">*/
class need_update
/*%FSM<LINK "time_items">*/
class time_items
{
priority = 2.000000;
to="cleanup_items";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _lastItemCheck) > 60"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastItemCheck = time;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "time_obj_update">*/
class time_obj_update
{
priority = 1.000000;
to="update_objects";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"( (count needUpdate_objects) > 0 && (time-_lastNeedUpdate>10) )"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastNeedUpdate = time;"/*%FSM</ACTION""">*/;
condition=/*%FSM<CONDITION""">*/"(time-_lastObjectUpdateCheck) > 10"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastObjectUpdateCheck = time;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "true">*/
class true
/*%FSM<LINK "anti_hack">*/
class anti_hack
{
priority = 0.000000;
to="general_cleanup";
to="check_for_hacker";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "too_many_objects">*/
class too_many_objects
{
priority = 0.000000;
to="cleanup_objects";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((time - _timeNem) > 60)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_timeNem = time;"/*%FSM</ACTION""">*/;
condition=/*%FSM<CONDITION""">*/"(time-_timeHackCheck) > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_timeHackCheck = time;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
@@ -141,80 +137,85 @@ class FSM
class cleanup_dead
{
name = "cleanup_dead";
init = /*%FSM<STATEINIT""">*/"diag_log (""CLEANUP: TOO MANY DEAD BODIES"");" \n
init = /*%FSM<STATEINIT""">*/"_numDead = {local _x} count allDead;" \n
"" \n
"diag_log (""CLEANUP: PERFORMING BODY CLEANUP ON "" + str(_numDead) + "" BODIES"");" \n
"if (_numDead > 300) then { " \n
"" \n
"_delQtyZ = 0;" \n
"_numZombie = {_x isKindOf ""zZombie_Base""} count allDead;" \n
"{" \n
" if (local _x) then {" \n
" if (_x isKindOf ""zZombie_Base"") then {" \n
" deleteVehicle _x;" \n
" _delQtyZ = _delQtyZ + 1;" \n
" } else {" \n
" _exists = _x in _deadBodies;" \n
" if(!_exists) then {" \n
" _deadBodies set [count _deadBodies,_x];" \n
" diag_log (""CLEANUP: TOO MANY DEAD BODIES"");" \n
" diag_log (""CLEANUP: PERFORMING BODY CLEANUP ON "" + str(_numDead) + "" BODIES"");" \n
"" \n
" _delQtyZ = 0; " \n
" _numZombie = {_x isKindOf ""zZombie_Base""} count allDead;" \n
" {" \n
" if (local _x) then {" \n
" if (_x isKindOf ""zZombie_Base"") then {" \n
" deleteVehicle _x;" \n
" _delQtyZ = _delQtyZ + 1;" \n
" } else {" \n
" _exists = _x in _deadBodies;" \n
" if(!_exists) then {" \n
" _deadBodies set [count _deadBodies,_x];" \n
" };" \n
" };" \n
" };" \n
" };" \n
"} forEach allDead;" \n
" } forEach allDead;" \n
"" \n
"//Cleanup players" \n
"_body = objNull;" \n
"_delQtyP = 0;" \n
"_delDo = _numDead - _numZombie;" \n
"_delDo = ((_delDo min (count _deadBodies)) -1);" \n
"if (_delDo<1) then {_delDo=1};" \n
"for ""_i"" from 0 to _delDo do {" \n
" _body = _deadBodies select _i;" \n
" if(!isNil ""_body"") then {" \n
" _pos = getPosATL _body;" \n
" _sfx = nearestObject [_pos,""Sound_Flies""];" \n
" if (!(isNull _sfx)) then {" \n
" deleteVehicle _sfx;" \n
" //Cleanup players" \n
" _body = objNull;" \n
" _delQtyP = 0;" \n
" _delDo = _numDead - _numZombie;" \n
" _delDo = ((_delDo min (count _deadBodies)) -1);" \n
" if (_delDo<1) then {_delDo=1};" \n
" for ""_i"" from 0 to _delDo do {" \n
" _body = _deadBodies select _i;" \n
" if(!isNil ""_body"") then {" \n
" _pos = getPosATL _body;" \n
" _sfx = nearestObject [_pos,""Sound_Flies""];" \n
" if (!(isNull _sfx)) then {" \n
" deleteVehicle _sfx;" \n
" };" \n
" deleteVehicle _body;" \n
" _delQtyP = _delQtyP + 1;" \n
" };" \n
" deleteVehicle _body;" \n
" _delQtyP = _delQtyP + 1;" \n
" };" \n
" _deadBodies set [_i,""DEL""];" \n
" _deadBodies set [_i,""DEL""];" \n
"" \n
"//Let's move this into the body removal sequence so uncontrolled flies are removed only if corpses are cleaned" \n
"//Check Flies" \n
"_isOK=-1;" \n
"_dwUSOFC=0;" \n
"{" \n
" //_isOk = {!alive _x} count (nearestObjects [_x, [""CAManBase""], 2]);" \n
" _isOk = {!alive _x} count (_x nearEntities [[""CAManBase""], 2]);" \n
" if (_isOk>-1) then {" \n
" diag_log (""DW_DEBUG _isOK: "" + str(_isOK) );" \n
" };" \n
" if ((_isOk>-1) AND (_isOK<1)) then {" \n
" //diag_log (""CLEANUP: DELETING A SOUND OF FLIES"");" \n
"_dwUSOFC=_dwUSOFC+1;" \n
" deleteVehicle _x;" \n
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED SOUND OF FLIES:"" + str(_dwUSOFC) );" \n
" };" \n
"} forEach allMissionObjects ""Sound_Flies"";" \n
" //Let's move this into the body removal sequence so uncontrolled flies are removed only if corpses are cleaned" \n
" //Check Flies" \n
" _isOK=-1;" \n
" _dwUSOFC=0;" \n
" {" \n
" //_isOk = {!alive _x} count (nearestObjects [_x, [""CAManBase""], 2]);" \n
" _isOk = {!alive _x} count (_x nearEntities [[""CAManBase""], 2]);" \n
" if (_isOk>-1) then {" \n
" diag_log (""DW_DEBUG _isOK: "" + str(_isOK) );" \n
" };" \n
" if ((_isOk>-1) AND (_isOK<1)) then {" \n
" //diag_log (""CLEANUP: DELETING A SOUND OF FLIES"");" \n
" _dwUSOFC=_dwUSOFC+1;" \n
" deleteVehicle _x;" \n
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED SOUND OF FLIES:"" + str(_dwUSOFC) );" \n
" };" \n
" } forEach allMissionObjects ""Sound_Flies"";" \n
"" \n
"" \n
"//Let's move this into the body removal sequence so uncontrolled fireplaces are removed only if corpses are cleaned" \n
"//clean fireplaces" \n
"_dwUFPC=0;" \n
"{" \n
" if (local _x) then {" \n
" //diag_log (""CLEANUP: DELETING A UNCONTROLLED FIREPLACE"");" \n
" deleteVehicle _x;" \n
"_dwUFPC=_dwUFPC+1;" \n
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED FIREPLACE:"" + str(_dwUFPC) );" \n
" //Let's move this into the body removal sequence so uncontrolled fireplaces are removed only if corpses are cleaned" \n
" //clean fireplaces" \n
" _dwUFPC=0;" \n
" {" \n
" if (local _x) then {" \n
" //diag_log (""CLEANUP: DELETING A UNCONTROLLED FIREPLACE"");" \n
" deleteVehicle _x;" \n
" _dwUFPC=_dwUFPC+1;" \n
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED FIREPLACE:"" + str(_dwUFPC) );" \n
" };" \n
" } forEach allMissionObjects ""Land_Fire_DZ"";" \n
"" \n
" };" \n
"} forEach allMissionObjects ""Land_Fire_DZ"";" \n
" _deadBodies = _deadBodies - [""DEL""];" \n
"" \n
" diag_log (""CLEANUP: DELETED "" + str(_delQtyP) + "" PLAYER BODIES AND "" + str(_delQtyZ) + "" BODIES"");" \n
"" \n
"};" \n
"_deadBodies = _deadBodies - [""DEL""];" \n
"" \n
"diag_log (""CLEANUP: DELETED "" + str(_delQtyP) + "" PLAYER BODIES AND "" + str(_delQtyZ) + "" BODIES"");" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -232,25 +233,27 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "cleanup_objects">*/
class cleanup_objects
/*%FSM<STATE "cleanup_items">*/
class cleanup_items
{
name = "cleanup_objects";
name = "cleanup_items";
init = /*%FSM<STATEINIT""">*/"_missionObjs = allMissionObjects ""WeaponHolder"";" \n
"_qty = count _missionObjs;" \n
"" \n
"//diag_log (""CLEANUP: PERFORMING ITEM CLEANUP: TOTAL "" + str(_qty) + "" LOOT BAGS"");" \n
"_delQty = 0;" \n
"_qtyLoc = 0;" \n
"{" \n
" if (local _x) then {" \n
" _qtyLoc = _qtyLoc + 1; // debugging" \n
" _keep = _x getVariable [""permaLoot"",false];" \n
" _nearby = {isPlayer _x} count (_x nearEntities [[""CAManBase""], 100]);" \n
" _nearby = {isPlayer _x} count (_x nearEntities [[""CAManBase""], 100]);" \n
" if ( (!_keep) && (_nearby==0) ) then {" \n
" deleteVehicle _x;" \n
" _delQty = _delQty + 1;" \n
" };" \n
" };" \n
"} forEach _missionObjs;" \n
"" \n
"if (_delQty > 0) then {" \n
" diag_log (""CLEANUP: DELETED "" + str(_delQty) + "" LOOT BAGS"");" \n
"};" \n
@@ -287,8 +290,8 @@ class FSM
" setDate _date;" \n
" dayzSetDate = _date;" \n
" publicVariable ""dayzSetDate"";" \n
" diag_log (""TIME SYNC: Local Time set to "" + str(_date));" \n
"};" \n
" diag_log (""TIME SYNC: Local Time set to "" + str(_date));" \n
" };" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -330,36 +333,8 @@ class FSM
" } forEach allMissionObjects ""ReammoBox"";" \n
"*/" \n
"" \n
"//Check for hackers" \n
" {" \n
" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
" diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
" (vehicle _x) setDamage 1;" \n
" _x setDamage 1;" \n
" };" \n
" } forEach allUnits;" \n
"" \n
"/*" \n
"//Let's move this into the body removal sequence so uncontrolled flies are removed only if corpses are cleaned" \n
"//Check Flies" \n
"_isOK=-1;" \n
"_dwUSOFC=0;" \n
"{" \n
" //_isOk = {!alive _x} count (nearestObjects [_x, [""CAManBase""], 2]);" \n
" _isOk = {!alive _x} count (_x nearEntities [[""CAManBase""], 2]);" \n
" if (_isOk>-1) then {" \n
" diag_log (""DW_DEBUG _isOK: "" + str(_isOK) );" \n
" };" \n
" if ((_isOk>-1) AND (isOK<1)) then {" \n
" //diag_log (""CLEANUP: DELETING A SOUND OF FLIES"");" \n
"_dwUSOFC=_dwUSOFC+1;" \n
" deleteVehicle _x;" \n
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED SOUND OF FLIES:"" + str(_dwUSOFC) );" \n
" };" \n
"} forEach allMissionObjects ""Sound_Flies"";" \n
"*/" \n
"" \n
"dayz_serverObjectMonitor = _safety;"/*%FSM</STATEINIT""">*/;
"dayz_serverObjectMonitor = _safety;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -384,10 +359,12 @@ class FSM
"" \n
"_safety = dayz_serverObjectMonitor;" \n
"" \n
"_lastUpdate = time;" \n
"_timeNem = time;" \n
"_lastTimeSync = time;" \n
"_lastDeadCheck = time;" \n
"_lastItemCheck = time;" \n
"_lastObjectUpdateCheck = time;" \n
"_timeHackCheck = time;" \n
"_deadBodies = [];" \n
"_lastNeedUpdate = time;" \n
"_maxBodies = 15;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -410,13 +387,16 @@ class FSM
class update_objects
{
name = "update_objects";
init = /*%FSM<STATEINIT""">*/"diag_log format[""DEBUG: needUpdate_objects=%1"",needUpdate_objects];" \n
"{" \n
"// _x setVariable [""needUpdate"",false,true];" \n
" needUpdate_objects = needUpdate_objects - [_x];" \n
" [_x,""all""] spawn server_updateObject;" \n
init = /*%FSM<STATEINIT""">*/"if ((count needUpdate_objects) > 0) then {" \n
"" \n
"} forEach needUpdate_objects;" \n
" diag_log format[""DEBUG: needUpdate_objects=%1"",needUpdate_objects];" \n
"" \n
" {" \n
" //_x setVariable [""needUpdate"",false,true];" \n
" needUpdate_objects = needUpdate_objects - [_x];" \n
" [_x,""all""] call server_updateObject; //should be call!!!" \n
" } forEach needUpdate_objects;" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -434,6 +414,37 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "check_for_hacker">*/
class check_for_hacker
{
name = "check_for_hacker";
init = /*%FSM<STATEINIT""">*/"//Check for hackers" \n
" {" \n
" if(vehicle _x != _x) then {" \n
" if (!(vehicle _x in _safety) && ((typeOf vehicle _x) != ""ParachuteWest"")) then {" \n
" diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
" (vehicle _x) setDamage 1;" \n
" _x setDamage 1;" \n
" };" \n
" };" \n
" } forEach allUnits;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="waiting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =

View File

@@ -144,7 +144,6 @@ diag_log "HIVE: Starting";
_countr = _countr + 1;
} forEach _objWpnTypes;
};
};
if (_object isKindOf "AllVehicles") then {
{