Epoch/Sources/epoch_code/compile/functions/EPOCH_fnc_isInsideBuilding.sqf

31 lines
833 B
Plaintext
Raw Normal View History

2015-12-07 16:24:52 +00:00
/*
Author: Aaron Clark - EpochMod.com
Contributors:
Description:
Function to check if player is in a building.
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/functions/EPOCH_fnc_isInsideBuilding.sqf
2015-12-07 16:24:52 +00:00
Example:
_inBuilding = call EPOCH_fnc_isInsideBuilding;
Parameter(s):
NONE
Returns:
BOOL
*/
2016-09-01 00:29:08 +00:00
//[[[cog import generate_private_arrays ]]]
private ["_abovePlayerPosASL","_inBuilding","_playerPosASL"];
//[[[end]]]
2015-09-14 20:55:36 +00:00
_playerPosASL = visiblePositionASL player;
_abovePlayerPosASL = [_playerPosASL select 0,_playerPosASL select 1,(_playerPosASL select 2) + 10];
//Return:
2015-12-07 16:24:52 +00:00
lineIntersects[_playerPosASL, _abovePlayerPosASL, player]