From 9ba0f40a1879c5dc5c3cadeaad3810435962e63d Mon Sep 17 00:00:00 2001 From: commy2 Date: Sun, 24 Apr 2016 20:56:07 +0200 Subject: [PATCH] fix CBA_fnc_randPos broken for 2D positions --- addons/common/fnc_randPos.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/common/fnc_randPos.sqf b/addons/common/fnc_randPos.sqf index 4eaf22fd7..cf1596038 100644 --- a/addons/common/fnc_randPos.sqf +++ b/addons/common/fnc_randPos.sqf @@ -29,4 +29,6 @@ params [ private _position = _entity call CBA_fnc_getPos; -_position vectorAdd [_radius - 2 * random _radius, _radius - 2 * random _radius, 0] +_position set [0, (_position select 0) + (_radius - 2 * random _radius)]; +_position set [1, (_position select 1) + (_radius - 2 * random _radius)]; +_position