Skip to content

Commit 5e7c558

Browse files
committed
Replaced bis_fnc_findSafePos with findEmptyPosition
findEmptyPosition is less complicated and sensitive. #156
1 parent bf61030 commit 5e7c558

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

source/dialog/request_vehicle.sqf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
_index = lbCurSel 2102;
22

3-
//_spawnPos = getpos player; Blocked by Tuxu
4-
_spawnPos = [getpos hq_blu1, 100, 250, 20, 0, 20, 0] call BIS_fnc_findSafePos; //changed by tuxu
5-
_spawnPos = [(_spawnPos select 0)+30, _spawnPos select 1];
3+
//findEmptyPosition example
4+
_spawnPos = (getpos hq_blu1) findEmptyPosition [40, 120]
5+
_spawnPos = [(_spawnPos select 0)+30, _spawnPos select 1]
66

77
addEWS_EH = {
88
(_this select 0) addEventHandler ["IncomingMissile", {
@@ -26,6 +26,10 @@ switch (_index) do {
2626
hint "Vehicle ready !";
2727
commandpointsblu1 = commandpointsblu1 - 4;
2828
ctrlSetText [1000, format["%1",commandpointsblu1]];
29+
//Might want refactor this next bit so it isn't repeated
30+
//In fact might want to refactor each case!
31+
_spawnPos = (getpos hq_blu1) findEmptyPosition [40, 120, vehicleType]
32+
_spawnPos = [(_spawnPos select 0)+30, _spawnPos select 1]
2933
vehic = "I_G_Offroad_01_F" createVehicle _spawnPos;
3034
} else {
3135
hint "Not enough command points";

0 commit comments

Comments
 (0)