use new getOutMan EH for vehicle anti wall glitch

This commit is contained in:
vbawol 2016-04-22 17:33:37 -05:00
parent ba1bf9ceab
commit b401cbad7b
4 changed files with 4 additions and 14 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 = [];

View File

@ -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"};