2015-09-14 20:55:36 +00:00
|
|
|
/*
|
2015-12-07 16:24:52 +00:00
|
|
|
Author: Aaron Clark - EpochMod.com
|
|
|
|
|
|
|
|
Contributors:
|
|
|
|
|
|
|
|
Description:
|
2015-09-14 20:55:36 +00:00
|
|
|
A3 Epoch Anti-Vehicle Wall glitch
|
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-06-13 16:54:19 +00:00
|
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_antiWall.sqf
|
2015-09-14 20:55:36 +00:00
|
|
|
*/
|
2016-07-05 18:22:14 +00:00
|
|
|
private ["_start","_end","_dirTo"];
|
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
|
|
|
};
|