Deprecated/Slow Commands

Stop using them!
This commit is contained in:
icomrade
2014-05-27 15:03:53 -04:00
parent 88ded0f3c0
commit 774441ef45
39 changed files with 94 additions and 77 deletions

View File

@@ -4,7 +4,7 @@ player playActionNow "PutDown";
sleep 2;
_flare attachTo [player,[0,0,0],"granat2"];
[_flare, -90, -10] call object_setpitchbank;
_flare setPos (getPos _flare);
[_flare] call FNC_GetSetPos;
_flare setVariable ["owner",player,true];
player removeAction s_player_grabflare;
player removeAction s_player_removeflare;

View File

@@ -21,4 +21,4 @@ _findNearestlight = [];
};
};
} foreach nearestObjects [getPos player, [], 20];
} foreach nearestObjects [([player] call FNC_getPos), [], 20];

View File

@@ -39,7 +39,7 @@ _findNearestTree = [];
};
};
} foreach nearestObjects [getPos player, [], 10];
} foreach nearestObjects [([player] call FNC_getPos), [], 10];
//diag_log format["DEBUG TREES: %1", _findNearestTree];

View File

@@ -33,8 +33,8 @@ while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
_posL = getPos _liftHeli;
_posC = getPos _vehicle;
_posL = [_liftHeli] call FNC_getPos;
_posC = [_vehicle] call FNC_getPos;
_height = (_posL select 2) - (_posC select 2);
/*
if(_height < 20) then {
@@ -72,7 +72,7 @@ if(_finished) then {
while {r_doLoop} do {
_attached = _vehicle getVariable["attached",false];
if(((getPos _liftHeli) select 2) < 5) then {
if ((([_liftHeli] call FNC_getPos) select 2) < 5) then {
r_doLoop = false;
};

View File

@@ -46,7 +46,7 @@ if(_removed == _countIn) then {
sleep 1;
//diag_log format["DEBUG: %1, id: %2 [%3]",_dog,_animalID,completedFSM _animalID];
if (!moveToCompleted _dog) then {
_dog moveTo (position _dog);
_dog moveTo ([_dog] call FNC_GetPos);
};
_dog disableAI "FSM";
(group _dog) setBehaviour "AWARE";

View File

@@ -128,7 +128,7 @@ if (_finished) then {
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
_location = [([player] call FNC_GetPos),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)

View File

@@ -105,7 +105,7 @@ if (_qty >= _qty_in) then {
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
_location = [([player] call FNC_GetPos),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)

View File

@@ -146,7 +146,7 @@ if (_finished) then {
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,2,2000,0] call BIS_fnc_findSafePos;
_location = [([player] call FNC_GetPos),0,20,1,2,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)

View File

@@ -122,7 +122,7 @@ if (_qty >= _qty_in) then {
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,2,2000,0] call BIS_fnc_findSafePos;
_location = [([player] call FNC_GetPos),0,20,1,2,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)

View File

@@ -146,7 +146,7 @@ if (_finished) then {
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
_location = [([player] call FNC_GetPos),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)

View File

@@ -128,7 +128,7 @@ if (_finished) then {
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
_location = [([player] call FNC_GetPos),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)

View File

@@ -130,7 +130,7 @@ if (_qty >= _qty_in) then {
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
_location = [([player] call FNC_GetPos),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)

View File

@@ -27,7 +27,7 @@ if (typename _this == typename objnull) then {
//--- PLAYER ------------------------------------------------
_brightness = 0.99;
_pos = position player;
_pos = [player] call FNC_GetPos;
_parray = [
/* 00 */ ["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13, 0],
/* 01 */ "",
@@ -192,9 +192,10 @@ if (typename _this == typename objnull) then {
};
} else {
//--- AI ------------------------------------------------
while {(position _unit select 2) > 100} do {
while {(([_unit] call FNC_GetPos) select 2) > 100} do {
_destination = expecteddestination _unit select 0;
if (_destination distance [position _unit select 0,position _unit select 1,0] > 10) then {
_unitPosition = [_unit] call FNC_GetPos;
if ((_destination distance [(_unitPosition select 0),(_unitPosition select 1),0]) > 10) then {
_vel = velocity _unit;
_dirTo = [_unit,_destination] call bis_fnc_dirto;
if (player distance _unit > 500) then {
@@ -223,7 +224,8 @@ if (typename _this == typename []) then {
//--- Free fall
if (count _this == 2) exitwith {
_alt = _this select 1;
_unit setpos [position _unit select 0,position _unit select 1,_alt];
_paraPosition = [_unit] call FNC_GetPos;
_unit setpos [(_paraPosition select 0),(_paraPosition select 1),_alt];
_unit setvariable ["bis_fnc_halo_now",true];
_unit spawn bis_fnc_halo;
};
@@ -231,9 +233,10 @@ if (typename _this == typename []) then {
_para = objnull;
_vel = [];
_para = "ParachuteWest" createVehicle position _unit;
_paraPosition1 = [_unit] call FNC_GetPos;
_para = createVehicle ["ParachuteWest", _paraPosition1, [], 0, "CAN_COLLIDE"];
//_para = "BIS_Steerable_Parachute" createVehicle position _unit;
_para setpos position _unit;
_para setpos _paraPosition1;
_para setdir direction _unit;
_vel = velocity _unit;
_unit moveindriver _para;
@@ -339,7 +342,7 @@ if (typename _this == typename []) then {
//--- End
//waituntil {vehicle player == player};
player setvariable ["bis_fnc_halo_terminate",nil];
waituntil {(position vehicle player select 2) < 2 || !isnil {player getvariable "bis_fnc_halo_terminate"}};
waituntil {(([(vehicle player)] call FNC_GetPos) select 2) < 2 || !isnil {player getvariable "bis_fnc_halo_terminate"}};
(finddisplay 46) displayremoveeventhandler ["keydown",bis_fnc_halo_para_keydown_eh];
(finddisplay 46) displayremoveeventhandler ["mousemoving",bis_fnc_halo_para_mousemoving_eh];
(finddisplay 46) displayremoveeventhandler ["mouseholding",bis_fnc_halo_para_mouseholding_eh];

View File

@@ -23,7 +23,7 @@ _lights = ["a_fuelstation_sign.p3d","lampa_ind_zebr.p3d","lampa_ind.p3d","lampa_
};
};
};
} foreach nearestObjects [getPos _target, [], _rng];
} foreach nearestObjects [([_target] call FNC_getPos), [], _rng];
};
@@ -86,10 +86,10 @@ _lCol = _this select 0;
_lbrt = _this select 1;
_lamb = _this select 2;
_doLit = _this select 4 select 0;
_twrPos = getPos _twr;
_twrPos = ([_twr] call FNC_getPos);
_rad=2.65;
_oset=14;
_nrTLs= position _twr nearObjects ["#lightpoint",20];
_nrTLs= _twrPos nearObjects ["#lightpoint",20];
if(count _nrTLs > 3)then{
//axeDiagLog = format["FN:TL FOUND LP:%1",count _nrTLs];

View File

@@ -39,7 +39,7 @@ if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
if (DZE_HeliLift) then {
_hasAttached = _vehicle getVariable["hasAttached",false];
if(_inVehicle and (_vehicle isKindOf "Air") and ((getPos _vehicle select 2) < 30) and (speed _vehicle < 5) and (typeName _hasAttached == "OBJECT")) then {
if(_inVehicle and (_vehicle isKindOf "Air") and ((([_vehicle] call FNC_getPos) select 2) < 30) and (speed _vehicle < 5) and (typeName _hasAttached == "OBJECT")) then {
if (s_player_heli_detach < 0) then {
dayz_myLiftVehicle = _vehicle;
s_player_heli_detach = dayz_myLiftVehicle addAction ["Detach Vehicle","\z\addons\dayz_code\actions\player_heliDetach.sqf",[dayz_myLiftVehicle,_hasAttached],2,false,true,"",""];
@@ -51,7 +51,7 @@ if (DZE_HeliLift) then {
};
if(DZE_HaloJump) then {
if(_inVehicle and (_vehicle isKindOf "Air") and ((getPos _vehicle select 2) > 400)) then {
if(_inVehicle and (_vehicle isKindOf "Air") and ((([_vehicle] call FNC_getPos) select 2) > 400)) then {
if (s_halo_action < 0) then {
DZE_myHaloVehicle = _vehicle;
s_halo_action = DZE_myHaloVehicle addAction [localize "STR_EPOCH_ACTIONS_HALO","\z\addons\dayz_code\actions\halo_jump.sqf",[],2,false,true,"",""];
@@ -285,8 +285,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
_liftHelis = nearestObjects [player, DZE_HeliAllowTowFrom, 15];
{
if(!_found) then {
_posL = getPos _x;
_posC = getPos _cursorTarget;
_posL = [_x] call FNC_getPos;
_posC = [_cursorTarget] call FNC_getPos;
_height = (_posL select 2) - (_posC select 2);
_hasAttached = _x getVariable["hasAttached",false];
if(_height < 15 and _height > 5 and (typeName _hasAttached != "OBJECT")) then {

View File

@@ -101,11 +101,11 @@ if(!isNil "_objHouse")then{
//publicVariable "axeDiagLog";
_objLightPoint = nearestObject [_x, "#lightpoint"];
_pos = getPos _x;
_pos = [_x] call FNC_getPos;
_dir = getDir _x;
if(_plyr distance _x < _lpRange)then{//If within create radius
[_lmpCol,_brtns,_lmpCol,getPos _x,_dir,[0,0,-1]] call axe_newLightPoint;
[_lmpCol,_brtns,_lmpCol,_pos,_dir,[0,0,-1]] call axe_newLightPoint;
//_x setVariable ["axeHLight", 1, false];
};
@@ -124,7 +124,7 @@ if(!isNil "_objHouse")then{
if(count _litHouses > 0 )then{
{
_objLightPoint = nearestObject [_x, "#lightpoint"];
_pos = getPos _x;
_pos = [_x] call FNC_getPos;
if((abs ([_pos, _objLightPoint] call BIS_fnc_distance2D))<_hsLPDist)then{//In House
if(_plyr distance _x < _lpRange)then{//If within range and outside band
@@ -147,7 +147,7 @@ if(!isNil "_objHouse")then{
}else{
if(_plyr distance _x < _lpRange)then{//If within create radius recreate lightpoint (after logging)
_brtns = [_plyr,_x] call axe_lightBrightness;
[_lmpCol,_brtns,_lmpCol,getPos _x,_dir,[0,0,-2.6]] call axe_newLightPoint;
[_lmpCol,_brtns,_lmpCol,_pos,_dir,[0,0,-2.6]] call axe_newLightPoint;
//axeDiagLog = format["HL:Recreating light %1 for %2 ",_x,name player];
//publicVariable "axeDiagLog";
};

View File

@@ -30,7 +30,7 @@ if(!isDedicated)then{
axeTowerLights = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lights_tower.sqf";
axeHouseLights = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lights_house.sqf";
waitUntil {getPos Player select 0 > 0};
waitUntil {(([Player] call FNC_getPos) select 0) > 0};
//Detect Dusk and Dawn
_sunrise = call world_sunRise;
@@ -101,7 +101,7 @@ if(!isDedicated)then{
};
};
//};
_plyPos = getPos player;
_plyPos = [Player] call FNC_getPos;
};
sleep _slpTime;
};

View File

@@ -16,7 +16,7 @@ _objHouses = nearestObjects [_nrstTrig, ["House"], _hsRange];
_hsCount = count _objHouses;
_rnd = random _hsCount;
_objHouse = _objHouses select _rnd;
_pos = getPos _objHouse;
_pos = [_objHouse] call FNC_getPos;
_lightstate = _objHouse animationPhase "Lights_1";
if(_lightstate==1) then{
_animlightpoint = nearestObject [_objHouse, "#lightpoint"];
@@ -47,7 +47,7 @@ _nrTowers = nearestObjects [_nrstTrig, ["Land_Ind_IlluminantTower"], _rng];
if(count _objHouses >0)then{
{
_objLightPoint = nearestObject [_x, "#lightpoint"];
if((abs ([getPos _x, _objLightPoint] call BIS_fnc_distance2D))<1.5)then{
if((abs ([([_x] call FNC_getPos), _objLightPoint] call BIS_fnc_distance2D))<1.5)then{
deleteVehicle _objLightPoint;
};
}forEach _objHouses;
@@ -65,7 +65,7 @@ _nrTowers = nearestObjects [_nrstTrig, ["Land_Ind_IlluminantTower"], _rng];
{
for "_s" from 1 to 4 do {
_objLightPoint = nearestObject [_x, "#lightpoint"];
if((abs ([getPos _x, _objLightPoint] call BIS_fnc_distance2D))<25)then{
if((abs ([([_x] call FNC_getPos), _objLightPoint] call BIS_fnc_distance2D))<25)then{
deleteVehicle _objLightPoint;
};
};

View File

@@ -7,13 +7,13 @@ _nearPlotPole = nearestObject [player, "Plastic_Pole_EP1_DZ"];
//"privatized" center variable
_BD_radius = DZE_PlotPole select 0;
_BD_center = getPos _nearPlotPole;
_BD_center = [_nearPlotPole] call FNC_getPos;
_objects = [];
// circle
for "_i" from 0 to 360 step (270 / _BD_radius) do {
_location = [(_BD_center select 0) + ((cos _i) * _BD_radius), (_BD_center select 1) + ((sin _i) * _BD_radius), _BD_center select 2];
_object = "Plastic_Pole_EP1" createVehicle _location;
_object = createVehicle ["Plastic_Pole_EP1", _location, [], 0, "CAN_COLLIDE"];
_object setpos _location;
};

View File

@@ -54,7 +54,7 @@ if (_height < 100) then {
_bolt attachTo [_hitObject,_val,_hitMemoryPt];
_dir = ([_hitObject,_unit] call BIS_fnc_relativeDirTo) + 180;
_bolt setDir (_dir);
_bolt setPos (getPos _bolt);
[_bolt] call FNC_GetSetPos;
_unit setVariable["firedHit",[]];
_unit setVariable["firedDamage",0,true];
};

View File

@@ -19,7 +19,7 @@ while {(alive _projectile) && !(isNull _projectile) && _callCount < 85;} do {
if (_projectflight > 0) then {
sleep (12 / (_projectflight));
};
if (alive _projectile && !(isNull _projectile)) then {_currentNear = (Position _projectile) nearEntities [["CAManBase","AllVehicles"],15];};
if (alive _projectile && !(isNull _projectile)) then {_currentNear = ([_projectile] call FNC_GetPos) nearEntities [["CAManBase","AllVehicles"],15];};
_listNear = _listNear + _currentNear;
_callCount = _callCount + 1;
};

View File

@@ -3,7 +3,7 @@ _target = _this select 0;
//_caller = _this select 1;
_id = _this select 2;
//_params = _this select 3;
_pos = position _target;
_pos = [_target] call FNC_GetPos;
_hasRawMeat = "FoodSteakRaw" in magazines player;
_hasdog = player getVariable ["dogid", "false"];

View File

@@ -1,6 +1,6 @@
private ["_listTalk","_eyeDir","_attacked","_continue","_type","_chance","_last","_refObj","_inAngle","_tPos","_zPos","_cantSee","_entHeight","_delta","_targets","_pHeight","_lowBlood","_dist"];
_refObj = vehicle player;
_listTalk = (getPos _refObj) nearEntities ["zZombie_Base",80];
_listTalk = ([_refObj] call FNC_GetPos) nearEntities ["zZombie_Base",80];
_pHeight = (getPosATL _refObj) select 2;
_attacked = false;
{

View File

@@ -25,7 +25,7 @@ _animalID setFSMVariable ["_isTamed", true];
sleep 1;
diag_log format["DEBUG: %1, id: %2 [%3]",_dog,_animalID,completedFSM _animalID];
if (!moveToCompleted _dog) then {
_dog moveTo (position _dog);
_dog moveTo ([_dog] call FNC_GetPos);
};
_dog disableAI "FSM";
(group _dog) setBehaviour "AWARE";

View File

@@ -2,7 +2,7 @@ private ["_unit","_originalPos","_pos","_chance","_playerpos"];
_unit = _this select 0;
_originalPos = _this select 1;
_pos = getPosATL _unit;
_playerpos = getPos player;
_playerpos = ([player] call FNC_GetPos);
if (count _this > 2) then {
_pos = _this select 2;

View File

@@ -381,7 +381,7 @@ if (!isDedicated) then {
} forEach _objInfo;
_i = _i + 2; // skip the ": " part
for "_k" from _i to _lenInfo do {
_objName = _objName + [_objInfo select _k];
_objName set [(count _objName), (_objInfo select _k)];
};
_objName = toLower(toString(_objName));
_objName
@@ -527,7 +527,26 @@ if (!isDedicated) then {
spawn_loot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot.sqf";
spawn_loot_small = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot_small.sqf";
// player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
FNC_GetSetPos = { //DO NOT USE IF YOU NEED ANGLE COMPENSATION!!!!
private "_pos";
_thingy = _this select 0;
_pos = getPosASL _thingy;
if (surfaceIsWater _pos) then {
_thingy setPosASL _pos;
} else {
_thingy setPosATL (ASLToATL _pos);
};
};
FNC_GetPos = {
private "_pos";
if (isNil {_this select 0}) exitWith {[0,0,0]};
_thingy = _this select 0;
_pos = getPosASL _thingy;
if !(surfaceIsWater _pos) then {
_pos = ASLToATL _pos;
};
_pos
};
local_setFuel = {
private["_qty","_vehicle"];
_vehicle = ;

View File

@@ -1,7 +1,7 @@
// unLoad_act.sqf
// AUGUST 2010 - norrin
private ["_args","_vcl","_loop","_position","_isOnDeck","_unit","_name","_crewVcl"];
private ["_args","_vcl","_loop","_unit","_name","_crewVcl"];
_args = _this select 3;
_name = _args select 0;
@@ -20,11 +20,6 @@ for [{ _loop = 0 },{ _loop < count _crewVcl },{ _loop = _loop + 1}] do
sleep 0.05;
_unit action ["EJECT", _vcl];
sleep 1;
_position = position _unit;
_isOnDeck = getPos _unit in LHA_Deck;
if (_isOnDeck) then {
_unit setPosAsl [(_position select 0), (_position select 1), (LHA_height+1)];
};
_unit switchMove "";
_unit switchMove "ainjppnemstpsnonwrfldnon";
sleep 0.2;

View File

@@ -50,7 +50,7 @@ fnc_usec_damageUnconscious = {
private["_veh","_unit"];
_veh = vehicle _this;
_unit = _this;
waitUntil{(((position _veh select 2 < 1) and (speed _veh < 1)) or (!r_player_unconscious))};
waitUntil{(((([_veh] call FNC_GetPos) select 2 < 1) and (speed _veh < 1)) or (!r_player_unconscious))};
if (r_player_unconscious) then {
_unit action ["eject", _veh];
waitUntil{((vehicle _this) != _this)};

View File

@@ -23,5 +23,5 @@ while {_int>1} do
{
sleep _x;
if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{};
"SmallSecondary" createvehicle(_v modelToWorld _effect2pos);
createVehicle ["SmallSecondary", (_v modelToWorld _effect2pos), [], 0, "CAN_COLLIDE"];
}foreach(_list);

View File

@@ -46,7 +46,7 @@ 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;
}forEach (toArray _co);
};
};
_this call "+_nfn+"};"

View File

@@ -90,7 +90,7 @@ for "_t" from 0 to 2 do {
//"
private ["_test", "_test2"];
_test = (_this select 0) setPos (position (_this select 0)); if (isnil "_test") then {_test = false};
_test = (_this select 0) setPos ([(_this select 0)] call FNC_GetPos); if (isnil "_test") then {_test = false};
_test2 = (_this select 0) playMove ""; if (isnil "_test2") then {_test2 = false};
_testvar = getText (configFile >> "CfgMissions" >> "Missions" >> "SP_BearRising" >> "directory");
if (_testvar != "") then {

View File

@@ -285,7 +285,7 @@ class FSM
"_target = objNull;" \n
"_attackTarget = objNull;" \n
"_target setVariable ['forceWalk',false];" \n
"_pos = position _dog;" \n
"_pos = [_dog] call FNC_GetPos;" \n
"_lastPos = _pos;" \n
"_move = """";" \n
"_movePos = [];" \n
@@ -325,7 +325,7 @@ class FSM
class Moving
{
name = "Moving";
init = /*%FSM<STATEINIT""">*/"_pos = [(getPos (vehicle player)),1,2,4,0,5,0] call BIS_fnc_findSafePos;" \n
init = /*%FSM<STATEINIT""">*/"_pos = [([(vehicle player)] call FNC_GetPos),1,2,4,0,5,0] call BIS_fnc_findSafePos;" \n
"" \n
"_dog moveTo _pos;" \n
"_dog forceSpeed (_speedVal select _maxSpeed);" \n
@@ -629,7 +629,7 @@ class FSM
class Tracking
{
name = "Tracking";
init = /*%FSM<STATEINIT""">*/"_pos = [(getPos _target),1,2,4,0,5,0] call BIS_fnc_findSafePos;" \n
init = /*%FSM<STATEINIT""">*/"_pos = [([_target] call FNC_GetPos),1,2,4,0,5,0] call BIS_fnc_findSafePos;" \n
"_dog moveTo _pos;" \n
"_dog forceSpeed (_speedVal select _maxSpeed);" \n
"_forceChange = false;" \n
@@ -707,9 +707,9 @@ class FSM
class Checking
{
name = "Checking";
init = /*%FSM<STATEINIT""">*/"_lastPos = position _dog;" \n
init = /*%FSM<STATEINIT""">*/"_lastPos = [_dog] call FNC_GetPos;" \n
"" \n
"_list = (position _dog) nearEntities [""Animal"",(_senseSkill * 3)];" \n
"_list = ([_dog] call FNC_GetPos) nearEntities [""Animal"",(_senseSkill * 3)];" \n
"_list = _list - [_dog];" \n
"" \n
"if (count _list > 0) then {" \n
@@ -750,7 +750,7 @@ class FSM
to="Tracking";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!isNull _target and ((time - _waitTime) > 2)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_lastPos = position _dog;"/*%FSM</ACTION""">*/;
action=/*%FSM<ACTION""">*/"_lastPos = [_dog] call FNC_GetPos;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
@@ -898,7 +898,7 @@ class FSM
condition=/*%FSM<CONDITION""">*/"!(isNull _attackTarget)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_command = ""none"";" \n
"if (!moveToCompleted _dog) then {" \n
" _dog moveTo (position _dog);" \n
" _dog moveTo ([_dog] call FNC_GetPos);" \n
"};" \n
"diag_log ""DEBUG: HAS TARGET"";"/*%FSM</ACTION""">*/;
};
@@ -921,7 +921,7 @@ class FSM
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"((time - _lostTime) > 60 && _waitTime > 1) || (_lostTarget && _waitTime > 1)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_dog playActionNow ""GestureSniff"";" \n
"_pos = [(getPos _dog),10,90,4,0,5,0] call BIS_fnc_findSafePos;"/*%FSM</ACTION""">*/;
"_pos = [([_dog] call FNC_GetPos),10,90,4,0,5,0] call BIS_fnc_findSafePos;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "commanded">*/
@@ -963,7 +963,7 @@ class FSM
condition=/*%FSM<CONDITION""">*/"(vehicle _character == _character)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"if (isNull _dog) then {" \n
" _dog = createAgent [_type, _Pos, [], 0, ""NONE""];" \n
" _pos = [(getPos player),1,3,4,0,5,0] call BIS_fnc_findSafePos;" \n
" _pos = [([player] call FNC_GetPos),1,3,4,0,5,0] call BIS_fnc_findSafePos;" \n
" _dog setpos _pos;" \n
"} ;" \n
"" \n
@@ -977,7 +977,7 @@ class FSM
class move_to_vehicle
{
name = "move_to_vehicle";
init = /*%FSM<STATEINIT""">*/"_playerloc = getPos (vehicle player);" \n
init = /*%FSM<STATEINIT""">*/"_playerloc = [(vehicle player)] call FNC_GetPos;" \n
"_dog moveTo _playerloc;" \n
"" \n
"diag_log ""DOG MOVING TO VEHICLE"";" \n
@@ -1022,7 +1022,7 @@ class FSM
class Wait
{
name = "Wait";
init = /*%FSM<STATEINIT""">*/"_pos = [(getPos _dog),10,90,4,0,5,0] call BIS_fnc_findSafePos;" \n
init = /*%FSM<STATEINIT""">*/"_pos = [([_dog] call FNC_GetPos),10,90,4,0,5,0] call BIS_fnc_findSafePos;" \n
"_dog moveTo _pos;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links

View File

@@ -1249,7 +1249,7 @@ class FSM
"dayz_slowCheck = [] spawn player_spawn_2;" \n
"" \n
"_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
"_nearestCity = nearestLocations [([player] call FNC_GetPos), [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
"Dayz_logonTown = ""Wilderness"";" \n
"" \n
"if (count _nearestCity > 0) then {Dayz_logonTown = text (_nearestCity select 0)};" \n

View File

@@ -29,7 +29,7 @@ while {true} do {
};
_world = toUpper(worldName); //toUpper(getText (configFile >> "CfgWorlds" >> (worldName) >> "description"));
_nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],300];
_nearestCity = nearestLocations [([player] call FNC_GetPos), ["NameCityCapital","NameCity","NameVillage","NameLocal"],300];
if (count _nearestCity > 0) then {
_town = text (_nearestCity select 0);

View File

@@ -28,7 +28,7 @@ if (_option == 1) then {
};
} forEach _objects;
_name = if (alive _player) then { name _player; } else { "Dead Player"; };
diag_log format ["MAINTAIN AREA BY %1 - %2 Objects at %3", _name, count _objects, position _player];
diag_log format ["MAINTAIN AREA BY %1 - %2 Objects at %3", _name, count _objects, (getPosATL _player)];
};
if (_option == 2) then {
if (damage _targetObj >= DZE_DamageBeforeMaint) then {

View File

@@ -79,8 +79,8 @@ _key call server_hiveWrite;
if(!_done) exitWith { diag_log("CUSTOM: failed to get id for : " + str(_uid)); };
if(DZE_TRADER_SPAWNMODE) then {
_object_para = "ParachuteMediumWest" createVehicle [0,0,0];
_object_para setpos [_location select 0, _location select 1,(_location select 2) + 65];
_object_para = createVehicle ["ParachuteMediumWest", [0,0,0], [], 0, "CAN_COLLIDE"];
_object_para setPos [_location select 0, _location select 1,(_location select 2) + 65];
_object = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
} else {
_object = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
@@ -104,7 +104,7 @@ _key call server_hiveWrite;
if(DZE_TRADER_SPAWNMODE) then {
_object attachTo [_object_para, [0,0,-1.6]];
sleep 1.0;
WaitUntil{(getpos _object select 2) < 0.1};
WaitUntil{(([_object] call FNC_GetPos) select 2) < 0.1};
detach _object;
deleteVehicle _object_para;
};

View File

@@ -15,7 +15,7 @@ _fadeFire = _this select 8;
diag_log("CRASHSPAWNER: Starting spawn logic for Crash Spawner");
while {true} do {
while {1 == 1} do {
private["_timeAdjust","_timeToSpawn","_spawnRoll","_crash","_hasAdjustment","_newHeight","_adjustedPos"];
// Allows the variance to act as +/- from the spawn frequency timer
_timeAdjust = round((random(_variance * 2)) - _variance);

View File

@@ -31,7 +31,7 @@ epoch_eventIsAny = {
_boolReturn
};
while {true} do {
while {1 == 1} do {
// Find current time from server
_key = "CHILD:307:";

View File

@@ -1,4 +1,4 @@
// Sample Drop Bomb
private ["_position"];
_position = [MarkerPosition,0,DynamicVehicleArea,10,0,2000,0] call BIS_fnc_findSafePos;
bomb = "Bo_GBU12_LGB" createVehicle [(_position select 0),(_position select 1), 1000];
bomb = createVehicle ["Bo_GBU12_LGB", [(_position select 0),(_position select 1), 1000], [], 0, "CAN_COLLIDE"];