mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
7067ad9b0a
Check the change log for details
32 lines
658 B
Plaintext
32 lines
658 B
Plaintext
/****************************************************************
|
|
File: UPSMON_gethighestbldpos.sqf
|
|
Author: Azroul13
|
|
|
|
Description:
|
|
Get the highest point of the building
|
|
|
|
Parameter(s):
|
|
<--- Array of building positions
|
|
Returns:
|
|
Number
|
|
****************************************************************/
|
|
|
|
private ["_bldpos","_result","_zbldposs","_lastzbldpos"];
|
|
|
|
_bldpos = _this select 0;
|
|
_result = 0;
|
|
_zbldposs = [];
|
|
_lastzbldpos = 0;
|
|
|
|
|
|
{
|
|
_zbldposs = _zbldposs + [_x select 2];
|
|
} foreach _bldpos;
|
|
|
|
{
|
|
_zblpos = _x;
|
|
If (_zblpos > _lastzbldpos) then {_result = _zblpos;} else {_result = _lastzbldpos;};
|
|
_lastzbldpos = _x;
|
|
} foreach _zbldposs;
|
|
|
|
_result; |