Epoch/Sources/epoch_code/compile/event_handlers/EPOCH_getOutMan.sqf
vbawol 90f5674a74 0.4.0.0 b584
More work on Dynamic HUD and hudConfigs are now found in CfgEpochClient.
Animal spawn table now found in CfgEpochClient.
Two new functions added to handle get(In|Out)Man Event Handlers.
moved forced disabling of build mode when getting in vehicle to getInMan
EH function.
removed a few unused files.
2016-08-12 13:15:11 -05:00

30 lines
909 B
Plaintext

/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
Get out handler for A3 Epoch
Includes Anti-Vehicle Wall glitch checks
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_getOutMan_EH.sqf
*/
private ["_start","_end","_dirTo"];
params ["_unit","_position","_vehicle"];
if (_unit == player) then {
_start = getPosWorld _vehicle;
// _worldPos set[2, (_worldPos select 2) + 1];
_dirTo = _vehicle getDir player;
_end = _vehicle getPos [(_vehicle distance player) + 1, _dirTo];
{
if (_x isKindOf "Const_All_Walls_F") exitWith{
player moveInAny _vehicle;
EPOCH_antiWallCount = EPOCH_antiWallCount + 1;
};
} forEach lineintersectsobjs[_start, AGLToASL _end, player, _vehicle, true, 2];
};