initial files
This commit is contained in:
25
kp_liberation.brf_sumava/functions/fn_getSectorRange.sqf
Normal file
25
kp_liberation.brf_sumava/functions/fn_getSectorRange.sqf
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
File: fn_getSectorRange.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2019-11-25
|
||||
Last Update: 2019-12-07
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
Gets the sector size with taking the given amount of units into account.
|
||||
|
||||
Parameter(s):
|
||||
_unitCount - Number of units to take into account [NUMBER, defaults to 0]
|
||||
|
||||
Returns:
|
||||
Calculated sector size [NUMBER]
|
||||
*/
|
||||
|
||||
params [
|
||||
["_unitCount", 0, [0]]
|
||||
];
|
||||
|
||||
|
||||
if (_unitCount < (GRLIB_sector_cap / 2)) exitWith {GRLIB_sector_size};
|
||||
if (_unitCount <= GRLIB_sector_cap) exitWith {GRLIB_sector_size - (GRLIB_sector_size * 0.5 * ((_unitCount / GRLIB_sector_cap) - 0.5))};
|
||||
GRLIB_sector_size * 0.75
|
||||
Reference in New Issue
Block a user