diff --git a/SQF/dayz_code/compile/fn_lightFunctions.sqf b/SQF/dayz_code/compile/fn_lightFunctions.sqf index 41900b2cf..eebe0ef49 100644 --- a/SQF/dayz_code/compile/fn_lightFunctions.sqf +++ b/SQF/dayz_code/compile/fn_lightFunctions.sqf @@ -44,7 +44,7 @@ _lp setVectorUp _vect; //_lp enableSimulation false;//Using this stops lights from illuminating for local player (not tried moving it to before parameters set) - Makes no difference to network broadcast, other players DO NOT see the object anyway //axeDiagLog = format["FN:LP NEW CREATE:BRIGHT:%3 | %1 for %2",_lp,player,_brt]; //publicVariable "axeDiagLog"; -_lp +true //return value isn't used, so return bool so engine doesn't complain }; axe_lightPoint={ diff --git a/SQF/dayz_code/compile/fn_unconscious.sqf b/SQF/dayz_code/compile/fn_unconscious.sqf index 194d21e16..fc5c748db 100644 --- a/SQF/dayz_code/compile/fn_unconscious.sqf +++ b/SQF/dayz_code/compile/fn_unconscious.sqf @@ -22,7 +22,7 @@ _sandLevel = ctrlPosition ((uiNamespace getVariable 'DAYZ_GUI_waiting') displayC // delay so that the character does not stop before falling: _disableHdlr = [] spawn { uiSleep 2; disableUserInput true; r_player_unconsciousInputDisabled = true; }; -autoRunActive = 0; +autoRunActive = false; player playAction "CanNotMove"; "dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [2]; "dynamicBlur" ppEffectCommit 0; diff --git a/SQF/dayz_code/compile/keyboard.sqf b/SQF/dayz_code/compile/keyboard.sqf index 9516ed6c4..be509fdb6 100644 --- a/SQF/dayz_code/compile/keyboard.sqf +++ b/SQF/dayz_code/compile/keyboard.sqf @@ -41,10 +41,10 @@ if (isNil "keyboard_keys") then { if (_ctrlState && !_altState) then {DZE_Z_ctrl = true;}; }; _autoRun = { - if (autoRunActive == 0) then { - autoRunActive = 1; + if (!autoRunActive) then { + autoRunActive = true; autoRunThread = [] spawn { - while {autoRunActive == 1} do { + while {autoRunActive} do { if ((player != vehicle player) or (surfaceIsWater (getPosASL player)) or r_fracture_legs) exitWith {call autoRunOff;}; player playAction "FastF"; uiSleep 0.5; @@ -185,7 +185,7 @@ if (isNil "keyboard_keys") then { _interrupt = { r_interrupt = true; if (DZE_Surrender) then {call dze_surrender_off}; - if (autoRunActive == 1) then {call autoRunOff;}; + if (autoRunActive) then {call autoRunOff;}; }; // TODO: left/right, when gear open: onKeyDown = "[_this,'onKeyDown',0,107,0,107] execVM '\z\addons\dayz_code\system\handleGear.sqf'"; _noise = { @@ -288,6 +288,7 @@ if (isNil "keyboard_keys") then { keyboard_keys resize 256; [[DIK_ESCAPE], _cancelBuild] call _addArray; [[DIK_INSERT], {DZE_Q_alt = true;}] call _addArray; + [[DIK_A,DIK_D,DIK_LEFT,DIK_RIGHT], _interrupt] call _addArray; [[DIK_F], _dze_f] call _addArray; [[DIK_PRIOR], _dze_q] call _addArray; [[DIK_NEXT], _dze_z] call _addArray; diff --git a/SQF/dayz_code/compile/local_lights_house.sqf b/SQF/dayz_code/compile/local_lights_house.sqf index 69049e51f..751f325b7 100644 --- a/SQF/dayz_code/compile/local_lights_house.sqf +++ b/SQF/dayz_code/compile/local_lights_house.sqf @@ -125,6 +125,7 @@ if(!isNil "_objHouse")then{ { _objLightPoint = nearestObject [_x, "#lightpoint"]; _pos = [_x] call FNC_getPos; + _dir = getDir _x; if((abs ([_pos, _objLightPoint] call BIS_fnc_distance2D))<_hsLPDist)then{//In House if(_plyr distance _x < _lpRange)then{//If within range && outside band diff --git a/SQF/dayz_code/compile/local_lights_init.sqf b/SQF/dayz_code/compile/local_lights_init.sqf index e096fd70a..3a56095d4 100644 --- a/SQF/dayz_code/compile/local_lights_init.sqf +++ b/SQF/dayz_code/compile/local_lights_init.sqf @@ -120,7 +120,7 @@ if(isServer)then{ _delQtyLights = 0; { if (local _x) then { - deleteVehicle _x; //should use sched_co_deleteVehicle instead + _x call sched_co_deleteVehicle; uiSleep 0.025; _delQtyLights = _delQtyLights + 1; } else { @@ -129,7 +129,7 @@ if(isServer)then{ if (count _pos > 0) then { _nearby = {(isPlayer _x) && (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 420]);//Use calculated range here. if (_nearby==0) then { - deleteVehicle _x; //should use sched_co_deleteVehicle instead + _x call sched_co_deleteVehicle; uiSleep 0.025; _delQtyLights = _delQtyLights + 1; }; diff --git a/SQF/dayz_code/compile/player_death.sqf b/SQF/dayz_code/compile/player_death.sqf index 9810f952b..06aaaaf81 100644 --- a/SQF/dayz_code/compile/player_death.sqf +++ b/SQF/dayz_code/compile/player_death.sqf @@ -66,7 +66,7 @@ player setVariable ["startcombattimer", 0]; //remove combat timer on death r_player_unconscious = false; r_player_cardiac = false; _model = typeOf player; -autoRunActive = 0; +autoRunActive = false; _array = _this; if (count _array > 0) then { diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 8f7cc4b39..b7ae65e34 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -142,7 +142,7 @@ if (!isDedicated) then { player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_checkRecipe.sqf"; // EPOCH ADDITIONS - autoRunOff = {autoRunActive = 0; terminate autoRunThread; player playActionNow "Stop";}; + autoRunOff = {autoRunActive = false; terminate autoRunThread; player playActionNow "Stop";}; dog_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dog_findTargetAgent.sqf"; dze_getModelName = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_getModelName.sqf"; dze_isnearest_player = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_isNearestPlayer.sqf"; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 74f6f3c28..572d6ca20 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -628,7 +628,7 @@ if (!isDedicated) then { if (isNil "DZE_BackpackAntiTheft") then {DZE_BackpackAntiTheft = false;}; if (isNil "DZE_requireplot") then {DZE_requireplot = 1;}; if (isNil "DZE_StaticConstructionCount") then {DZE_StaticConstructionCount = 0;}; - autoRunActive = 0; + autoRunActive = false; DZE_ActionInProgress = false; DZE_AntiWallCounter = 0; DZE_myHaloVehicle = objNull; diff --git a/SQF/dayz_code/system/zombie_agent.fsm b/SQF/dayz_code/system/zombie_agent.fsm index 2aa9d3a06..82c66a7ff 100644 --- a/SQF/dayz_code/system/zombie_agent.fsm +++ b/SQF/dayz_code/system/zombie_agent.fsm @@ -515,6 +515,7 @@ class FSM name = "Chase"; init = /*%FSM*/"_timeN = diag_tickTime;" \n "" \n + "if (isNull _agent) exitWith {}; //Prevent errors if zombie is suddenly deleted" \n "_adjustSpeed = if (DZE_slowZombies) then {2} else {_agent getVariable [""speedLimit"", 3]};" \n "_agent forceSpeed _adjustSpeed;" \n "" \n