2015-09-14 20:55:36 +00:00
|
|
|
/*
|
2015-12-07 16:24:52 +00:00
|
|
|
Author: Aaron Clark - EpochMod.com
|
|
|
|
|
|
|
|
Contributors:
|
|
|
|
|
|
|
|
Description:
|
2016-08-12 18:15:11 +00:00
|
|
|
Get out handler for A3 Epoch
|
|
|
|
Includes Anti-Vehicle Wall glitch checks
|
2015-12-07 16:24:52 +00:00
|
|
|
|
|
|
|
Licence:
|
|
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
|
|
|
|
Github:
|
2016-08-12 18:15:11 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_getOutMan_EH.sqf
|
2015-09-14 20:55:36 +00:00
|
|
|
*/
|
2016-09-01 00:29:08 +00:00
|
|
|
//[[[cog import generate_private_arrays ]]]
|
|
|
|
private ["_dirTo","_end","_start"];
|
|
|
|
//[[[end]]]
|
2016-04-22 22:33:37 +00:00
|
|
|
params ["_unit","_position","_vehicle"];
|
2015-09-14 20:55:36 +00:00
|
|
|
if (_unit == player) then {
|
2016-07-05 18:22:14 +00:00
|
|
|
_start = getPosWorld _vehicle;
|
|
|
|
// _worldPos set[2, (_worldPos select 2) + 1];
|
2016-04-08 20:21:46 +00:00
|
|
|
_dirTo = _vehicle getDir player;
|
2016-07-05 18:22:14 +00:00
|
|
|
_end = _vehicle getPos [(_vehicle distance player) + 1, _dirTo];
|
2015-09-14 20:55:36 +00:00
|
|
|
{
|
|
|
|
if (_x isKindOf "Const_All_Walls_F") exitWith{
|
|
|
|
player moveInAny _vehicle;
|
|
|
|
EPOCH_antiWallCount = EPOCH_antiWallCount + 1;
|
|
|
|
};
|
2016-07-05 18:22:14 +00:00
|
|
|
} forEach lineintersectsobjs[_start, AGLToASL _end, player, _vehicle, true, 2];
|
2015-09-14 20:55:36 +00:00
|
|
|
};
|