mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
Replace forEach with Count
Use count where you do not need _forEachIndex variable, it's quicker than forEach.
This commit is contained in:
@@ -92,7 +92,7 @@ if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
|
||||
clearvehicleinit _v;
|
||||
deleteVehicle _v;
|
||||
_v =(_wreck) createvehicle _pos;
|
||||
{_x moveincargo _v} foreach _crw;
|
||||
{_x moveincargo _v} count _crw;
|
||||
_v setVectorDirAndUp [_dir,_vecUp];
|
||||
_v setFuel 0;
|
||||
_v setdamage 0;
|
||||
@@ -126,7 +126,7 @@ else
|
||||
clearvehicleinit _v;
|
||||
deleteVehicle _v;
|
||||
_v =(_wreck) createvehicle _pos;
|
||||
{_x moveincargo _v} foreach _crw;
|
||||
{_x moveincargo _v} count _crw;
|
||||
//sleep 0.05;
|
||||
_v setvelocity _vel;
|
||||
//_v setPos _pos;
|
||||
|
||||
@@ -10,7 +10,7 @@ if (count _this > 2) then {_lifecheck=_this select 2};
|
||||
|
||||
_int = _int min 3;
|
||||
|
||||
if (!((_v isKindOf "Air")OR{((_v isKindOf "LandVehicle")OR{(_v isKindOf "Ship")})})) exitWith {};
|
||||
if (!((_v isKindOf "Air")||{((_v isKindOf "LandVehicle")||{(_v isKindOf "Ship")})})) exitWith {};
|
||||
|
||||
_effect2pos = _v selectionposition "destructionEffect2";
|
||||
|
||||
@@ -24,4 +24,4 @@ while {_int>1} do
|
||||
sleep _x;
|
||||
if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{};
|
||||
createVehicle ["SmallSecondary", (_v modelToWorld _effect2pos), [], 0, "CAN_COLLIDE"];
|
||||
}foreach(_list);
|
||||
}count(_list);
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Created exclusively for ArmA2:OA - DayZMod.
|
||||
Please request permission to use/alter/distribute from project leader (R4Z0R49) AND the author (facoptere@gmail.com)
|
||||
Please request permission to use/alter/distribute from project leader (R4Z0R49) && the author (facoptere@gmail.com)
|
||||
*/
|
||||
|
||||
_REMOVED_LIB = ["addAction", "addEventhandler", "addMagazine", "addMagazineCargo", "addWeapon","addWeaponCargo", "addWPCur", "animate", "callVar", "clearMagazineCargo", "clearWeaponCargo", "createDiaryRecord","createMarkerLocal", "createSimpleTask", "createTaskSet", "debugLog", "deleteWP", "enablesimulation", "endMission","execfsm", "fadeMusic", "fadeSound", "failMission", "globalChat", "globalRadio", "groupChat", "groupRadio","hideObject", "hint", "hintC", "kbAddTopic", "kbreact", "kbRemoveTopic", "kbtell", "land", "move", "moveIn","playAction", "playActionnow", "playmovenow", "playMusic", "playsound", "removeAction","removeAllWeapons", "setCaptive", "setCurrentTask", "setCurrentTaskArrays", "setDate", "setDir", "setGroupID","setMarkerPosLocal", "setObjectTexture", "setSimpleTaskDescription", "setTaskState", "setWPdesc", "setWPtype","showCommandingMenu", "sideChat", "sideRadio", "skiptime", "spawn", "switchAction", "switchCamera", "taskHint","titleCut", "Hangender"];
|
||||
@@ -13,17 +13,17 @@ private["_ofn","_nfn","_REMOVED_LIB","_TRACED_LIB"];
|
||||
_ofn=format["r%1code",_x];
|
||||
_nfn=format["r%1code%2",_x,round(random(100000))];
|
||||
if(_x=="execVM")then{
|
||||
call compile format["%1=%2;%2={if((count _this>=3)AND{(!((_this select 2)IN%3))})then{diag_log(""WARNING RE %2 with illegal args:""+str(_this));}else{_this call %1}};",_nfn,_ofn,["ca\Modules\Functions\init.sqf"]];
|
||||
call compile format["%1=%2;%2={if((count _this>=3)&&{(!((_this select 2)IN%3))})then{diag_log(""WARNING RE %2 with illegal args:""+str(_this));}else{_this call %1}};",_nfn,_ofn,["ca\Modules\Functions\init.sqf"]];
|
||||
}else{
|
||||
#ifdef RESEC_VERBOSE
|
||||
call compile format ["%1=%2;%2={diag_log(""RE %2 args:""+str(_this));_this call %1};",_nfn,_ofn];
|
||||
#endif
|
||||
};
|
||||
}foreach _TRACED_LIB;
|
||||
}count _TRACED_LIB;
|
||||
{
|
||||
_ofn=format["r%1code",_x];
|
||||
call compile format["%1={diag_log(""WARNING illegal RE %1 with args:""+str(_this));};",_ofn];
|
||||
}foreach _REMOVED_LIB;
|
||||
}count _REMOVED_LIB;
|
||||
|
||||
#ifndef SKIP_REMOTEEXECUTIONSERVER
|
||||
[]spawn{
|
||||
@@ -45,8 +45,8 @@ private["_ofn","_nfn","_REMOVED_LIB","_TRACED_LIB"];
|
||||
};
|
||||
if(typeName _co==""STRING"")then{
|
||||
{
|
||||
if(!((_x>=65&&_x<=90)OR(_x>=97&&_x<=122))) exitWith {diag_log(""WARNING possible code injection args:""+str(_this)); _this=[];};
|
||||
}forEach (toArray _co);
|
||||
if(!((_x>=65&&_x<=90)||(_x>=97&&_x<=122))) exitWith {diag_log(""WARNING possible code injection args:""+str(_this)); _this=[];};
|
||||
}count (toArray _co);
|
||||
};
|
||||
};
|
||||
_this call "+_nfn+"};"
|
||||
|
||||
@@ -92,7 +92,7 @@ class FSM
|
||||
priority = 0.000000;
|
||||
to="End";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"(time - _timeA) > 120 and !_isSomeone"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"(time - _timeA) > 120 && !_isSomeone"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@@ -181,7 +181,7 @@ class FSM
|
||||
priority = 0.000000;
|
||||
to="End";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"(time - _timeA) > 120 and !_isSomeone"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"(time - _timeA) > 120 && !_isSomeone"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
|
||||
@@ -28,7 +28,7 @@ waitUntil {vehicle player == player};
|
||||
while {true} do {
|
||||
sleep 5;
|
||||
};
|
||||
PVDZE_atp = format["WARNING PLAYER WITH NAME (%1) and UID# (%2) HAS CHANGED THE TRUE VALUE TO FALSE", _playerName, _playerUID];
|
||||
PVDZE_atp = format["WARNING PLAYER WITH NAME (%1) && UID# (%2) HAS CHANGED THE TRUE VALUE TO FALSE", _playerName, _playerUID];
|
||||
publicVariableServer "PVDZE_atp";
|
||||
endMission "LOSER";
|
||||
sleep 10;
|
||||
@@ -48,13 +48,13 @@ while {1 == 1} do {
|
||||
_topv = 0;
|
||||
_toph = 0;
|
||||
|
||||
while {((typeName player == "OBJECT") AND {((player in playableUnits) OR {(alive player)})})} do {
|
||||
while {((typeName player == "OBJECT") && {((player in playableUnits) || {(alive player)})})} do {
|
||||
_curpos = getPosATL (vehicle player);
|
||||
_distance = _lastpos distance _curpos;
|
||||
_curtime = diag_ticktime;
|
||||
_difftime = _curtime - _lasttime;
|
||||
|
||||
if ((_distance > 10) OR {(_difftime > 1)}) then {
|
||||
if ((_distance > 10) || {(_difftime > 1)}) then {
|
||||
if (!_al1veOnce) then {
|
||||
private [ "_loc", "_plant"];
|
||||
// check that plants libs are properly loaded
|
||||
@@ -69,7 +69,7 @@ while {1 == 1} do {
|
||||
endMission "LOSER";
|
||||
};
|
||||
deleteVehicle _plant;
|
||||
} forEach ["grass", "prunus", "picea", "fallentree", "phragmites", "acer", "amygdalusn", "Brush", "fiberplant", "amygdalusc", "boulder"];
|
||||
} count ["grass", "prunus", "picea", "fallentree", "phragmites", "acer", "amygdalusn", "Brush", "fiberplant", "amygdalusc", "boulder"];
|
||||
diag_log format [ "%1: Plants libs tests done!", __FILE__];
|
||||
};
|
||||
_al1veOnce = true;
|
||||
@@ -86,7 +86,7 @@ while {1 == 1} do {
|
||||
_safetyVehicle = vehicle player;
|
||||
|
||||
if (_lastVehicle == vehicle player) then {
|
||||
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
|
||||
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) || (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
|
||||
(vehicle player) setposATL _lastpos;
|
||||
//PVDZE_atp = [name player, dayz_characterID, _lastpos, _curPos, getPosATL player];
|
||||
PVDZE_atp = format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", getPlayerUID player, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player];
|
||||
@@ -108,7 +108,7 @@ while {1 == 1} do {
|
||||
// freefall detection:
|
||||
_v = -((velocity player) select 2);
|
||||
_h = (getPosATL player) select 2;
|
||||
if (_v > 4 AND _h > 3) then {
|
||||
if (_v > 4 && _h > 3) then {
|
||||
_topv = _topv max _v;
|
||||
_toph = _toph max _h;
|
||||
Dayz_freefall = [ time, _toph, _topv ];
|
||||
|
||||
@@ -9,10 +9,10 @@ while {_run} do {
|
||||
_nearby = false;
|
||||
{
|
||||
if (_x distance _building < 500) then {_nearby = true};
|
||||
} forEach (call BIS_fnc_listPlayers);
|
||||
} count (call BIS_fnc_listPlayers);
|
||||
if (!_nearby) then {_run = false};
|
||||
sleep 5;
|
||||
};
|
||||
{deleteVehicle _x;} forEach _items;
|
||||
{deleteVehicle _x;} count _items;
|
||||
|
||||
_building setVariable ["looted",(DateToNumber date),true];
|
||||
@@ -6,11 +6,11 @@ textLogFormat ["PRELOAD_ Functions\init.sqf %1", _this];
|
||||
|
||||
Description:
|
||||
Function library initialization.
|
||||
All files have to start with 'fn_' prefix and they name have to be same as name of function.
|
||||
All files have to start with 'fn_' prefix && they name have to be same as name of function.
|
||||
Don't forget to exclude comma after last item in array!
|
||||
|
||||
Caution:
|
||||
Do not execute this init directly - there is dependency with MPF and need to run on all machines.
|
||||
Do not execute this init directly - there is dependency with MPF && need to run on all machines.
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: 'Function manager' logic
|
||||
@@ -33,7 +33,7 @@ textLogFormat ["Log: [Functions] Init script executed at %1",time];
|
||||
//--- PREPROCESS -----------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
|
||||
//--- Create variables for all functions (and preprocess them after first call)
|
||||
//--- Create variables for all functions (&& preprocess them after first call)
|
||||
for "_t" from 0 to 2 do {
|
||||
_pathConfig = [configfile,campaignconfigfile,missionconfigfile] select _t;
|
||||
_pathFile = ["ca\modules\functions","functions","functions"] select _t;
|
||||
|
||||
@@ -107,7 +107,7 @@ item102[] = {"target_lost",4,218,525.000000,-475.000000,625.000000,-425.000000,0
|
||||
item103[] = {"target_dead",4,218,525.000000,-525.000000,625.000000,-475.000000,0.000000,"target dead"};
|
||||
item104[] = {"",7,210,696.000000,-154.000000,704.000000,-146.000000,0.000000,""};
|
||||
item105[] = {"find_target",4,218,350.000000,-275.000000,450.000000,-225.000000,1.000000,"find target"};
|
||||
item106[] = {"DayZ_Dog_Agent_FSM",-1,250,-475.000000,-625.000000,-75.000000,-425.000000,0.000000,"DayZ Dog Agent FSM" \n "Created by Rocket and Alby"};
|
||||
item106[] = {"DayZ_Dog_Agent_FSM",-1,250,-475.000000,-625.000000,-75.000000,-425.000000,0.000000,"DayZ Dog Agent FSM" \n "Created by Rocket && Alby"};
|
||||
item107[] = {"____FAKE____",9,4280,0.000000,0.000000,0.000000,0.000000,0.000000,"____FAKE____"};
|
||||
version=1;
|
||||
class LayoutItems
|
||||
@@ -314,7 +314,7 @@ class FSM
|
||||
priority = 0.000000;
|
||||
to="action_init";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"dayz_clientPreload and (!isNil ""_handle"")"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"dayz_clientPreload && (!isNil ""_handle"")"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@@ -435,7 +435,7 @@ class FSM
|
||||
priority = 0.000000;
|
||||
to="Sitting";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > _idleTime) and _standing"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > _idleTime) && _standing"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_standing = false;" \n
|
||||
"if (!_watchDog) then {" \n
|
||||
" _move = ""Dog_LieDown"";" \n
|
||||
@@ -605,7 +605,7 @@ class FSM
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_command != ""stay"""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"if (_command == ""return"") then {" \n
|
||||
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
||||
" if ((player distance _dog > 5) && (_watchDog)) then {" \n
|
||||
" _dog playActionNow ""GestureBark"";" \n
|
||||
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
||||
" };" \n
|
||||
@@ -655,7 +655,7 @@ class FSM
|
||||
priority = 4.000000;
|
||||
to="Waiting";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"isNull _target and ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"isNull _target && ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_command = ""none"";"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@@ -680,7 +680,7 @@ class FSM
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_command != ""track"""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"if (_command == ""return"") then {" \n
|
||||
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
||||
" if ((player distance _dog > 5) && (_watchDog)) then {" \n
|
||||
" _dog playActionNow ""GestureBark"";" \n
|
||||
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
||||
" };" \n
|
||||
@@ -694,7 +694,7 @@ class FSM
|
||||
to="Tracking";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((time - _waitTime) > 0.5)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"if ((random 1) < 0.3 and (time - _coolDown > 4) and _dog distance _target > 10 ) then {" \n
|
||||
action=/*%FSM<ACTION""">*/"if ((random 1) < 0.3 && (time - _coolDown > 4) && _dog distance _target > 10 ) then {" \n
|
||||
" _dog playActionNow ""GestureSniff"";" \n
|
||||
" _coolDown = time;" \n
|
||||
"};"/*%FSM</ACTION""">*/;
|
||||
@@ -739,7 +739,7 @@ class FSM
|
||||
priority = 4.000000;
|
||||
to="Waiting";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"isNull _target and ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"isNull _target && ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_command = ""none"";"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@@ -749,7 +749,7 @@ class FSM
|
||||
priority = 1.000000;
|
||||
to="Tracking";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!isNull _target and ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!isNull _target && ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_lastPos = [_dog] call FNC_GetPos;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@@ -932,7 +932,7 @@ class FSM
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_command != ""none"""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"if (_command == ""return"") then {" \n
|
||||
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
||||
" if ((player distance _dog > 5) && (_watchDog)) then {" \n
|
||||
" _dog playActionNow ""GestureBark"";" \n
|
||||
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
||||
" };" \n
|
||||
@@ -1044,7 +1044,7 @@ class FSM
|
||||
to="Waiting";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_command == ""return"""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
||||
action=/*%FSM<ACTION""">*/"if ((player distance _dog > 5) && (_watchDog)) then {" \n
|
||||
" _dog playActionNow ""GestureBark"";" \n
|
||||
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
||||
"};"/*%FSM</ACTION""">*/;
|
||||
@@ -1115,7 +1115,7 @@ class FSM
|
||||
"_dog setVariable [""state"", ""passive"", true];" \n
|
||||
"" \n
|
||||
"if (_command == ""return"") then {" \n
|
||||
" if ((player distance _dog > 5) and (_watchDog)) then {" \n
|
||||
" if ((player distance _dog > 5) && (_watchDog)) then {" \n
|
||||
" _dog playActionNow ""GestureBark"";" \n
|
||||
" [_dog,""dog_bark"",0,false] call dayz_zombieSpeak;" \n
|
||||
" };" \n
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
private["_firePlace","_ok","_mags","_serial","_qty","_countr"];
|
||||
_firePlace = _this;
|
||||
while {alive _firePlace} do {
|
||||
while {inflamed _firePlace and alive _fireplace} do {
|
||||
while {inflamed _firePlace && alive _fireplace} do {
|
||||
//Use Wood
|
||||
_ok = false;
|
||||
_mags = getMagazineCargo _firePlace;
|
||||
@@ -33,7 +33,7 @@ while {alive _firePlace} do {
|
||||
_firePlace inflame false;
|
||||
};
|
||||
};
|
||||
while {!inflamed _firePlace and alive _fireplace} do {
|
||||
while {!inflamed _firePlace && alive _fireplace} do {
|
||||
//Wait
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
@@ -369,7 +369,7 @@ _filterItems = {
|
||||
LB_CTRL = _lbcontrol;
|
||||
{
|
||||
_lbcontrol lnbDeleteRow _x;
|
||||
} forEach _deleteIndexes;
|
||||
} count _deleteIndexes;
|
||||
};
|
||||
|
||||
_itemPicture = {
|
||||
|
||||
@@ -60,7 +60,7 @@ item55[] = {"get_ready_to_clo",2,250,400.000000,400.000000,500.000000,450.000000
|
||||
item56[] = {"sleep_",4,218,550.000000,400.000000,650.000000,450.000000,0.000000,"sleep" \n ""};
|
||||
item57[] = {"Disconnect",2,250,825.000000,400.000000,925.000000,450.000000,0.000000,"Disconnect"};
|
||||
item58[] = {"No_time_date",4,218,25.000000,1150.000000,125.000000,1200.000000,0.000000,"No time/date"};
|
||||
item59[] = {"ERROR__No_Date_or",2,250,175.000000,1150.000000,275.000000,1200.000000,0.000000,"ERROR:" \n "No Date or Time"};
|
||||
item59[] = {"ERROR__No_Date_or",2,250,175.000000,1150.000000,275.000000,1200.000000,0.000000,"ERROR:" \n "No Date || Time"};
|
||||
item60[] = {"Too_Long",4,218,300.000000,1150.000000,400.000000,1200.000000,0.000000,"Too" \n "Long"};
|
||||
item61[] = {"get_ready_to_clo_1",2,250,450.000000,800.000000,550.000000,850.000000,0.000000,"get ready to close"};
|
||||
item62[] = {"sleep_",4,218,600.000000,800.000000,700.000000,850.000000,0.000000,"sleep" \n ""};
|
||||
@@ -334,10 +334,10 @@ class FSM
|
||||
" _charPos = getPosATL player;" \n
|
||||
" _playerPos = [round(direction player),_charPos];" \n
|
||||
" " \n
|
||||
" if (_onLadder or _isInVehicle or _isTerminal) then {" \n
|
||||
" if (_onLadder || _isInVehicle || _isTerminal) then {" \n
|
||||
" _currentAnim = """";" \n
|
||||
" //If position to be updated, make sure it is at ground level!" \n
|
||||
" if ((count _playerPos > 0) and !_isTerminal) then {" \n
|
||||
" if ((count _playerPos > 0) && !_isTerminal) then {" \n
|
||||
" _charPos set [2,0];" \n
|
||||
" _playerPos set[1,_charPos];" \n
|
||||
" };" \n
|
||||
@@ -698,7 +698,7 @@ class FSM
|
||||
" };" \n
|
||||
" dayz_myBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];" \n
|
||||
" _countr = _countr + 1;" \n
|
||||
" } forEach _backpackWpnTypes;" \n
|
||||
" } count _backpackWpnTypes;" \n
|
||||
" " \n
|
||||
" //Magazines" \n
|
||||
" _countr = 0;" \n
|
||||
@@ -707,7 +707,7 @@ class FSM
|
||||
" if (_x == ""ItemTent"") then { _x = ""ItemTentOld"" };" \n
|
||||
" dayz_myBackpack addMagazineCargoGlobal [_x,(_backpackMagQty select _countr)];" \n
|
||||
" _countr = _countr + 1;" \n
|
||||
" } forEach _backpackMagTypes;" \n
|
||||
" } count _backpackMagTypes;" \n
|
||||
" " \n
|
||||
" dayz_myBackpackMags = getMagazineCargo dayz_myBackpack;" \n
|
||||
" dayz_myBackpackWpns = getWeaponCargo dayz_myBackpack;" \n
|
||||
@@ -772,7 +772,7 @@ class FSM
|
||||
" freshSpawn = 0;" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
"if(dayz_paraSpawn and (freshSpawn == 2)) then {" \n
|
||||
"if(dayz_paraSpawn && (freshSpawn == 2)) then {" \n
|
||||
" player setDir _setDir;" \n
|
||||
" player setPosATL [(_setPos select 0),(_setPos select 1),2000];" \n
|
||||
" [player,2000] spawn BIS_fnc_halo;" \n
|
||||
@@ -793,8 +793,8 @@ class FSM
|
||||
" usecBleed = [player,_x,_x];" \n
|
||||
" publicVariable ""usecBleed""; // draw blood stream on character, on all gameclients" \n
|
||||
" };" \n
|
||||
"} forEach USEC_typeOfWounds;" \n
|
||||
"//Legs and Arm fractures" \n
|
||||
"} count USEC_typeOfWounds;" \n
|
||||
"//Legs && Arm fractures" \n
|
||||
"_legs = player getVariable [""hit_legs"",0];" \n
|
||||
"_arms = player getVariable [""hit_hands"",0];" \n
|
||||
"" \n
|
||||
@@ -814,7 +814,7 @@ class FSM
|
||||
"" \n
|
||||
"dayz_playerUID = _playerUID;" \n
|
||||
"" \n
|
||||
"if ((_isNew) OR (count _inventory == 0)) then {" \n
|
||||
"if ((_isNew) || (count _inventory == 0)) then {" \n
|
||||
" //player is new, add initial loadout only if player is not pzombie" \n
|
||||
" if(!(player isKindOf ""PZombie_VB"")) then {" \n
|
||||
" _config = (configFile >> ""CfgSurvival"" >> ""Inventory"" >> ""Default"");" \n
|
||||
@@ -840,13 +840,13 @@ class FSM
|
||||
" if (_isOK) then {" \n
|
||||
" player addMagazine _x;" \n
|
||||
" };" \n
|
||||
" } forEach _mags;" \n
|
||||
" } count _mags;" \n
|
||||
" {" \n
|
||||
" _isOK = isClass(configFile >> ""CfgWeapons"" >> _x);" \n
|
||||
" if (_isOK) then {" \n
|
||||
" player addWeapon _x;" \n
|
||||
" };" \n
|
||||
" } forEach _wpns;" \n
|
||||
" } count _wpns;" \n
|
||||
" " \n
|
||||
" if (_bcpk != """") then {" \n
|
||||
" player addBackpack _bcpk; " \n
|
||||
@@ -859,7 +859,7 @@ class FSM
|
||||
" } else {" \n
|
||||
" dayz_myBackpack addMagazineCargoGlobal [_x, 1];" \n
|
||||
" };" \n
|
||||
" } forEach _bcpkItems;" \n
|
||||
" } count _bcpkItems;" \n
|
||||
" } else {" \n
|
||||
" if (_bcpkItems != """") then {" \n
|
||||
" dayz_myBackpack addMagazineCargoGlobal [_bcpkItems, 1];" \n
|
||||
@@ -975,7 +975,7 @@ class FSM
|
||||
" _ctrlBleed = _display displayCtrl 1303;" \n
|
||||
" _ctrlBleed ctrlShow false;" \n
|
||||
" };" \n
|
||||
" if (!r_fracture_legs and !r_fracture_arms) then {" \n
|
||||
" if (!r_fracture_legs && !r_fracture_arms) then {" \n
|
||||
" _ctrlFracture = _display displayCtrl 1203;" \n
|
||||
" _ctrlFracture ctrlShow false;" \n
|
||||
" };" \n
|
||||
@@ -1014,7 +1014,7 @@ class FSM
|
||||
name = "Load_In";
|
||||
init = /*%FSM<STATEINIT""">*/"//Reveal action types" \n
|
||||
"" \n
|
||||
"{player reveal _x} forEach (nearestObjects [getPosATL player, dayz_reveal, 50]);" \n
|
||||
"{player reveal _x} count (nearestObjects [getPosATL player, dayz_reveal, 50]);" \n
|
||||
"" \n
|
||||
"dayz_clientPreload = true;" \n
|
||||
"3 fadeSound 1;" \n
|
||||
@@ -1028,7 +1028,7 @@ class FSM
|
||||
" } else {" \n
|
||||
" _id = [_x,1] spawn object_roadFlare " \n
|
||||
" };" \n
|
||||
" } forEach (allMissionObjects ""LitObject"");"/*%FSM</STATEINIT""">*/;
|
||||
" } count (allMissionObjects ""LitObject"");"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
@@ -1104,7 +1104,7 @@ class FSM
|
||||
" if (count _state > 2) then {" \n
|
||||
" dayz_temperatur = _state select 2;" \n
|
||||
" }; " \n
|
||||
" if ((count _state > 3) and DZE_FriendlySaving) then {" \n
|
||||
" if ((count _state > 3) && DZE_FriendlySaving) then {" \n
|
||||
" DZE_Friends = _state select 3;" \n
|
||||
" }; " \n
|
||||
"} else {" \n
|
||||
@@ -1135,7 +1135,7 @@ class FSM
|
||||
"" \n
|
||||
"reload player;" \n
|
||||
"" \n
|
||||
"if (_currentAnim != """" and !dayz_paraSpawn) then {" \n
|
||||
"if (_currentAnim != """" && !dayz_paraSpawn) then {" \n
|
||||
" [objNull, player, rSwitchMove,_currentAnim] call RE;" \n
|
||||
"};" \n
|
||||
"" \n
|
||||
@@ -1283,7 +1283,7 @@ class FSM
|
||||
"};" \n
|
||||
"" \n
|
||||
"// TODO: questionably" \n
|
||||
"{ _x call fnc_veh_ResetEH; } forEach vehicles;" \n
|
||||
"{ _x call fnc_veh_ResetEH; } count vehicles;" \n
|
||||
"" \n
|
||||
"private[""_fadeFire""];" \n
|
||||
"{" \n
|
||||
@@ -1291,14 +1291,14 @@ class FSM
|
||||
" if (!_fadeFire) then {" \n
|
||||
" _nul = [_x,2,0,false,false] spawn BIS_Effects_Burn;" \n
|
||||
" };" \n
|
||||
"} forEach entities ""SpawnableWreck"";" \n
|
||||
"} count entities ""SpawnableWreck"";" \n
|
||||
"" \n
|
||||
"// remove box " \n
|
||||
"[] spawn {" \n
|
||||
" private [""_counter""];" \n
|
||||
" _counter = 0;" \n
|
||||
" while {true} do {" \n
|
||||
" if ((player getVariable[""combattimeout"", 0] >= time) or (_counter >= 60) or (player distance DZE_PROTOBOX > 2)) exitWith {" \n
|
||||
" if ((player getVariable[""combattimeout"", 0] >= time) || (_counter >= 60) || (player distance DZE_PROTOBOX > 2)) exitWith {" \n
|
||||
" deleteVehicle DZE_PROTOBOX;" \n
|
||||
" };" \n
|
||||
" sleep 1;" \n
|
||||
@@ -1472,7 +1472,7 @@ class FSM
|
||||
"//[false] call stream_locationCheck;" \n
|
||||
"" \n
|
||||
"_zombies = (getPosATL player) nearEntities [""zZombie_Base"",25];" \n
|
||||
"{deleteVehicle _x} forEach _zombies;" \n
|
||||
"{deleteVehicle _x} count _zombies;" \n
|
||||
"" \n
|
||||
"endLoadingScreen;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
@@ -1559,7 +1559,7 @@ class FSM
|
||||
name = "Disconnect";
|
||||
init = /*%FSM<STATEINIT""">*/"endLoadingScreen;" \n
|
||||
"" \n
|
||||
"// disable player interaction and move him off site" \n
|
||||
"// disable player interaction && move him off site" \n
|
||||
"// player setPos [10,10,100000];" \n
|
||||
" player enableSimulation false;" \n
|
||||
"" \n
|
||||
|
||||
@@ -16,7 +16,7 @@ while {true} do {
|
||||
_delMe = true;
|
||||
};
|
||||
_cursor = _cursor + 1;
|
||||
} forEach dayz_buildingMonitor;
|
||||
} count dayz_buildingMonitor;
|
||||
if (_delMe) then {
|
||||
dayz_buildingMonitor = dayz_buildingMonitor - ["DEL"];
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ while {true} do {
|
||||
// Check for radiation
|
||||
DZE_InRadiationZone = false;
|
||||
|
||||
_outsideMap = ((dayz_myPosition select 0) < dayz_minpos OR (dayz_myPosition select 1) < dayz_minpos OR (dayz_myPosition select 0) > dayz_maxpos OR (dayz_myPosition select 1) > dayz_maxpos);
|
||||
_outsideMap = ((dayz_myPosition select 0) < dayz_minpos || (dayz_myPosition select 1) < dayz_minpos || (dayz_myPosition select 0) > dayz_maxpos || (dayz_myPosition select 1) > dayz_maxpos);
|
||||
|
||||
if((_outsideMap || DZE_Quarantine) && !r_player_dead && !isNull (findDisplay 46)) then {
|
||||
DZE_InRadiationZone = true;
|
||||
@@ -60,17 +60,17 @@ while {true} do {
|
||||
if (!_inVehicle) then {
|
||||
_thirst = (_speed + 4) * 3;
|
||||
};
|
||||
dayz_thirst = dayz_thirst + (_thirst / 60) * (dayz_temperatur / dayz_temperaturnormal); //TeeChange Temperatur effects added Max Effects: -25% and + 16.6% waterloss
|
||||
dayz_thirst = dayz_thirst + (_thirst / 60) * (dayz_temperatur / dayz_temperaturnormal); //TeeChange Temperatur effects added Max Effects: -25% && + 16.6% waterloss
|
||||
|
||||
//Temperatur
|
||||
2 call player_temp_calculation; //2 = sleep time of this loop //TeeChange
|
||||
if ((_lastTemp - dayz_temperatur) > 0.75 or (_lastTemp - dayz_temperatur) < -0.75 ) then {
|
||||
if ((_lastTemp - dayz_temperatur) > 0.75 || (_lastTemp - dayz_temperatur) < -0.75 ) then {
|
||||
player setVariable ["temperature",dayz_temperatur,true];
|
||||
_lastTemp = dayz_temperatur;
|
||||
};
|
||||
|
||||
//can get nearby infection
|
||||
if (!r_player_infected and !_isPZombie) then {
|
||||
if (!r_player_infected && !_isPZombie) then {
|
||||
//Infectionriskstart
|
||||
if (dayz_temperatur < ((80 / 100) * (dayz_temperaturnormal - dayz_temperaturmin) + dayz_temperaturmin)) then { //TeeChange
|
||||
_listTalk = (getPosATL _refObj) nearEntities ["CAManBase",8];
|
||||
@@ -85,7 +85,7 @@ while {true} do {
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach _listTalk;
|
||||
} count _listTalk;
|
||||
if (dayz_temperatur < ((50 / 100) * (dayz_temperaturnormal - dayz_temperaturmin) + dayz_temperaturmin)) then { //TeeChange
|
||||
_rnd = (random 1) * (((dayz_temperaturnormal - dayz_temperatur) * (100 /(dayz_temperaturnormal - dayz_temperaturmin)))/ 25); //TeeChange
|
||||
if (_rnd < 0.05) then {
|
||||
@@ -99,7 +99,7 @@ while {true} do {
|
||||
};
|
||||
};
|
||||
|
||||
//If has infection reduce blood cough and add shake
|
||||
//If has infection reduce blood cough && add shake
|
||||
if (r_player_infected) then {
|
||||
if !(player getVariable["USEC_infected",false]) then {
|
||||
player setVariable["USEC_infected",true,true];
|
||||
@@ -117,7 +117,7 @@ while {true} do {
|
||||
};
|
||||
|
||||
//Pain Shake Effects
|
||||
if (r_player_inpain and !r_player_unconscious) then {
|
||||
if (r_player_inpain && !r_player_unconscious) then {
|
||||
playSound "breath_1";
|
||||
addCamShake [2, 1, 25];
|
||||
};
|
||||
@@ -147,7 +147,7 @@ while {true} do {
|
||||
|
||||
_radsound = "radzone1";
|
||||
_bloodloss = 10;
|
||||
if(_radTimer > 5 AND _radTimer < 10) then {
|
||||
if(_radTimer > 5 && _radTimer < 10) then {
|
||||
_radsound = "radzone2";
|
||||
_bloodloss = 20;
|
||||
};
|
||||
@@ -172,9 +172,9 @@ while {true} do {
|
||||
_radTimer = 0;
|
||||
};
|
||||
|
||||
// Health uptick when healty not thirsty or hungry
|
||||
if (_foodVal >= 0.9 and _thirstVal >= 0.9) then {
|
||||
if (!r_player_infected and !r_player_inpain and !r_player_injured and !DZE_InRadiationZone) then {
|
||||
// Health uptick when healty not thirsty || hungry
|
||||
if (_foodVal >= 0.9 && _thirstVal >= 0.9) then {
|
||||
if (!r_player_infected && !r_player_inpain && !r_player_injured && !DZE_InRadiationZone) then {
|
||||
_result = r_player_blood + 10;
|
||||
if (_result >= r_player_bloodTotal) then {
|
||||
r_player_blood = r_player_bloodTotal;
|
||||
@@ -186,7 +186,7 @@ while {true} do {
|
||||
|
||||
//Record low blood
|
||||
_lowBlood = player getVariable ["USEC_lowBlood", false];
|
||||
if ((r_player_blood < r_player_bloodTotal) and !_lowBlood) then {
|
||||
if ((r_player_blood < r_player_bloodTotal) && !_lowBlood) then {
|
||||
player setVariable["USEC_lowBlood",true,true];
|
||||
};
|
||||
|
||||
@@ -214,7 +214,7 @@ while {true} do {
|
||||
};
|
||||
};
|
||||
|
||||
// If in combat, display counter and restrict logout
|
||||
// If in combat, display counter && restrict logout
|
||||
_startcombattimer = player getVariable["startcombattimer",0];
|
||||
if (_startcombattimer == 1) then {
|
||||
player setVariable["combattimeout", time + 30, true];
|
||||
|
||||
@@ -173,7 +173,7 @@ class FSM
|
||||
priority = 0.000000;
|
||||
to="Begin";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"dayz_clientPreload and !(isNull _agent)"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"dayz_clientPreload && !(isNull _agent)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
|
||||
Reference in New Issue
Block a user