diff --git a/Sources/epoch_code/compile/EPOCH_antiWall.sqf b/Sources/epoch_code/compile/EPOCH_antiWall.sqf index c19bc8a1..eb0cdd39 100644 --- a/Sources/epoch_code/compile/EPOCH_antiWall.sqf +++ b/Sources/epoch_code/compile/EPOCH_antiWall.sqf @@ -13,10 +13,8 @@ https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/compile/EPOCH_antiWall.sqf */ private ["_worldPos","_front","_dirTo","_front2"]; -params ["_vehicle","_position","_unit"]; +params ["_unit","_position","_vehicle"]; if (_unit == player) then { - _vehicle removeAllEventHandlers "GetOut"; - EPOCH_currentVehicle = objNull; _worldPos = getPosATLVisual _vehicle; _worldPos set[2, (_worldPos select 2) + 1]; _front = _worldPos; diff --git a/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf b/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf index bd00dd6d..8e9a2b59 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_masterLoop.sqf @@ -50,13 +50,4 @@ while {'+_condition+'} do { }; '; }forEach _configs; -_build_sqf = _build_sqf + ' - if (vehicle player != player) then { - if (isNull EPOCH_currentVehicle) then { - EPOCH_currentVehicle = vehicle player; - EPOCH_currentVehicle addEventHandler["GetOut", "_this call EPOCH_antiWall"]; - }; - }; - uiSleep 0.1; -};'; call compile _build_sqf; diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf index a4930622..fb3900a0 100644 --- a/Sources/epoch_code/init/client_init.sqf +++ b/Sources/epoch_code/init/client_init.sqf @@ -46,7 +46,6 @@ EPOCH_prevOffer = []; EPOCH_drawIcon3d = false; EPOCH_velTransform = false; EPOCH_stabilityTarget = objNull; -EPOCH_currentVehicle = objNull; EPOCH_currentTarget = objNull; EPOCH_LootedBlds = []; EPOCH_lootObjects = []; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index 812338e5..0cf9c1aa 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -59,7 +59,7 @@ class CfgEpochClient displayAddEventHandler[] = {"keyDown","keyUp"}; keyDown = "(_this call EPOCH_KeyDown)"; keyUp = "(_this call EPOCH_KeyUp)"; - addEventHandler[] = {"Respawn","Put","Take","InventoryClosed","InventoryOpened","Fired","Killed","HandleRating"}; + addEventHandler[] = {"Respawn","Put","Take","InventoryClosed","InventoryOpened","Fired","Killed","HandleRating","GetInMan","GetOutMan"}; Respawn = "(_this select 0) call EPOCH_clientRespawn"; Put = "(_this select 1) call EPOCH_interact;_this call EPOCH_PutHandler"; Take = "(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck"; @@ -73,6 +73,8 @@ class CfgEpochClient Dammaged = ""; Hit = ""; HitPart = ""; + GetInMan = ""; + GetOutMan = "_this call EPOCH_antiWall;"; // suppress these units from spawning near Jammer or Traders nonJammerAI[] = {"B_Heli_Transport_01_F","PHANTOM","Epoch_Cloak_F"};