BIS_fnc_relPos replaced with getRelPos
This commit is contained in:
parent
d40950c936
commit
6549b75cd9
|
@ -35,7 +35,7 @@ if ( dialog ) then {
|
|||
|
||||
if ( dojump > 0 ) then {
|
||||
GRLIB_last_halo_jump = time;
|
||||
halo_position = [ halo_position, random 250, random 360 ] call BIS_fnc_relPos;
|
||||
halo_position = halo_position getRelPos [random 250, random 360];
|
||||
halo_position = [ halo_position select 0, halo_position select 1, GRLIB_halo_altitude + (random 200) ];
|
||||
halojumping = true;
|
||||
sleep 0.1;
|
||||
|
|
|
@ -155,7 +155,7 @@ while {true} do {
|
|||
|
||||
if (count (choiceslist select _idxchoice) == 3) then {
|
||||
private _truck = (choiceslist select _idxchoice) select 2;
|
||||
player setposATL ([_truck, 5 + (random 3), random 360] call BIS_fnc_relPos);
|
||||
player setposATL (_truck getRelPos [5 + (random 3), random 360]);
|
||||
KP_liberation_respawn_mobile_done = true;
|
||||
} else {
|
||||
private _destpos = ((choiceslist select _idxchoice) select 1);
|
||||
|
|
|
@ -15,7 +15,7 @@ private _infantry_trigger = 1 + (ceil (random 2));
|
|||
private _vehicle_trigger = 1;
|
||||
private _ied_type = selectRandom ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"];
|
||||
private _ied_obj = objNull;
|
||||
private _roadobj = [[getmarkerpos (_sector), random (200), random (360)] call BIS_fnc_relPos, 200, []] call BIS_fnc_nearestRoad;
|
||||
private _roadobj = [(getmarkerpos (_sector) getRelPos [random (200), random (360)]), 200, []] call BIS_fnc_nearestRoad;
|
||||
private _goes_boom = false;
|
||||
private _ied_marker = "";
|
||||
|
||||
|
@ -25,7 +25,7 @@ if (_count > 0) then {
|
|||
|
||||
if (!(isnull _roadobj)) then {
|
||||
private _roadpos = getpos _roadobj;
|
||||
_ied_obj = createMine [_ied_type, [_roadpos, _spread, random (360)] call BIS_fnc_relPos, [], 0];
|
||||
_ied_obj = createMine [_ied_type, _roadpos getRelPos [_spread, random (360)], [], 0];
|
||||
_ied_obj setdir (random 360);
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {private _text = format ["[KP LIBERATION] [ASYMMETRIC] manage_asymIED.sqf -> IED %1 spawned at %2", _count, markerText _sector];_text remoteExec ["diag_log",2];};
|
||||
|
|
|
@ -33,7 +33,7 @@ while { GRLIB_endgame == 0 } do {
|
|||
|
||||
_nearestroad = objNull;
|
||||
while { isNull _nearestroad } do {
|
||||
_nearestroad = [[getmarkerpos (_spawnsector), random (100), random (360)] call BIS_fnc_relPos, 200, []] call BIS_fnc_nearestRoad;
|
||||
_nearestroad = [(getmarkerpos (_spawnsector)) getRelPos [random (100), random (360)], 200, []] call BIS_fnc_nearestRoad;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
|
@ -74,7 +74,7 @@ while { GRLIB_endgame == 0 } do {
|
|||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
{
|
||||
_nearestroad = [ [ getmarkerpos (_x), random(100), random(360) ] call BIS_fnc_relPos, 200, [] ] call BIS_fnc_nearestRoad;
|
||||
_nearestroad = [(getmarkerpos _x) getRelPos [random(100), random(360)], 200, []] call BIS_fnc_nearestRoad;
|
||||
if ( isNull _nearestroad ) then {
|
||||
_waypoint = _grp addWaypoint [ markerpos _x, 100 ];
|
||||
} else {
|
||||
|
|
|
@ -13,9 +13,9 @@ private _convoy_destinations = [];
|
|||
private _spawnpos = _convoy_destinations select 0;
|
||||
[4, _spawnpos] remoteExec ["remote_call_intel"];
|
||||
|
||||
private _scout_vehicle = [ [ _spawnpos, 30, 0 ] call BIS_fnc_relPos, opfor_mrap, true, false ] call F_libSpawnVehicle;
|
||||
private _escort_vehicle = [ [ _spawnpos, 10, 0 ] call BIS_fnc_relPos, selectRandom opfor_vehicles_low_intensity, true, false ] call F_libSpawnVehicle;
|
||||
private _transport_vehicle = [ [ _spawnpos, 10, 180 ] call BIS_fnc_relPos, opfor_ammobox_transport, true, false ] call F_libSpawnVehicle;
|
||||
private _scout_vehicle = [_spawnpos getRelPos [30, 0], opfor_mrap, true, false] call F_libSpawnVehicle;
|
||||
private _escort_vehicle = [_spawnpos getRelPos [10, 0], selectRandom opfor_vehicles_low_intensity, true, false] call F_libSpawnVehicle;
|
||||
private _transport_vehicle = [_spawnpos getRelPos [10, 180], opfor_ammobox_transport, true, false] call F_libSpawnVehicle;
|
||||
|
||||
private _boxes_amount = 0;
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ while { _boxes_loaded < _boxes_amount } do {
|
|||
|
||||
sleep 0.5;
|
||||
|
||||
private _troop_vehicle = [ [ _spawnpos, 30, 180 ] call BIS_fnc_relPos, opfor_transport_truck, true, true, false ] call F_libSpawnVehicle;
|
||||
private _troop_vehicle = [_spawnpos getRelPos [30, 180], opfor_transport_truck, true, true, false ] call F_libSpawnVehicle;
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ private _spawn_marker = [ 3000, 999999, false ] call F_findOpforSpawnPoint;
|
|||
if ( _spawn_marker == "" ) exitWith { diag_log "[KP LIBERATION] [ERROR] Could not find position for search and rescue mission"; };
|
||||
used_positions pushbackUnique _spawn_marker;
|
||||
|
||||
private _helopos = [ getmarkerpos _spawn_marker, random 200, random 360 ] call BIS_fnc_relPos;
|
||||
private _helopos = (getmarkerpos _spawn_marker) getRelPos [random 200, random 360];
|
||||
private _helowreck = GRLIB_sar_wreck createVehicle _helopos;
|
||||
_helowreck allowDamage false;
|
||||
_helowreck setPos _helopos;
|
||||
|
@ -16,10 +16,10 @@ _helofire setpos (getpos _helowreck);
|
|||
_helofire setpos (getpos _helowreck);
|
||||
|
||||
private _pilotsGrp = createGroup [GRLIB_side_enemy, true];
|
||||
private _pilotsPos = [ getpos _helowreck, 25, random 360 ] call BIS_fnc_relPos;
|
||||
private _pilotsPos = (getpos _helowreck) getRelPos [25, random 360];
|
||||
pilot_classname createUnit [ _pilotsPos, _pilotsGrp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
|
||||
sleep 0.2;
|
||||
pilot_classname createUnit [ [ _pilotsPos, 1, random 360 ] call BIS_fnc_relPos, _pilotsGrp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
|
||||
pilot_classname createUnit [_pilotsPos getRelPos [1, random 360], _pilotsGrp,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
|
||||
sleep 2;
|
||||
private _pilotUnits = units _pilotsGrp;
|
||||
{
|
||||
|
@ -56,12 +56,12 @@ private _grpsentry = createGroup [GRLIB_side_enemy, true];
|
|||
private _nbsentry = 2 + (floor (random 3));
|
||||
|
||||
for [ {_idx=0},{_idx < _nbsentry},{_idx=_idx+1} ] do {
|
||||
opfor_sentry createUnit [ [ _pilotsPos, 1, random 360 ] call BIS_fnc_relPos, _grpsentry,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
|
||||
opfor_sentry createUnit [_pilotsPos getRelPos [1, random 360], _grpsentry,"this addMPEventHandler [""MPKilled"", {_this spawn kill_manager}]", 0.5, "private"];
|
||||
};
|
||||
|
||||
(leader _grpsentry) setDir (random 360);
|
||||
|
||||
(opfor_transport_truck createVehicle ([ getpos _helowreck, 25, random 360 ] call BIS_fnc_relPos)) setDir random 360;
|
||||
(opfor_transport_truck createVehicle ((getpos _helowreck) getRelPos [25, random 360])) setDir random 360;
|
||||
|
||||
private _vehicle_pool = opfor_vehicles;
|
||||
if ( combat_readiness < 50 ) then {
|
||||
|
@ -71,10 +71,10 @@ if ( combat_readiness < 50 ) then {
|
|||
private _vehtospawn = [];
|
||||
private _spawnchances = [75,50,15];
|
||||
{if (random 100 < _x) then {_vehtospawn pushBack (selectRandom _vehicle_pool);};} foreach _spawnchances;
|
||||
{ ( [ [ getpos _helowreck, 30 + (random 30), random 360 ] call BIS_fnc_relPos , _x, true ] call F_libSpawnVehicle ) addMPEventHandler ['MPKilled', {_this spawn kill_manager}]; } foreach _vehtospawn;
|
||||
{([(getpos _helowreck) getRelPos [30 + (random 30), random 360], _x, true] call F_libSpawnVehicle) addMPEventHandler ['MPKilled', {_this spawn kill_manager}]; } foreach _vehtospawn;
|
||||
|
||||
secondary_objective_position = getpos _helowreck;
|
||||
secondary_objective_position_marker = [ secondary_objective_position, 800, random 360 ] call BIS_fnc_relPos;
|
||||
secondary_objective_position_marker = secondary_objective_position getRelPos [800, random 360];
|
||||
publicVariable "secondary_objective_position_marker";
|
||||
sleep 1;
|
||||
GRLIB_secondary_in_progress = 2; publicVariable "GRLIB_secondary_in_progress";
|
||||
|
|
|
@ -18,7 +18,7 @@ if (random 100 < 12) then {
|
|||
private _vehicle_trigger = 1;
|
||||
private _ied_type = selectRandom ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"];
|
||||
private _ied_obj = objNull;
|
||||
private _roadobj = [[getmarkerpos (_sector), random (_radius), random (360)] call BIS_fnc_relPos, _radius, []] call BIS_fnc_nearestRoad;
|
||||
private _roadobj = [(getmarkerpos _sector) getRelPos [random _radius, random 360], _radius, []] call BIS_fnc_nearestRoad;
|
||||
private _goes_boom = false;
|
||||
private _ied_marker = "";
|
||||
|
||||
|
@ -31,7 +31,7 @@ if (_number > 0) then {
|
|||
if (!(isnull _roadobj)) then {
|
||||
|
||||
_roadpos = getpos _roadobj;
|
||||
_ied_obj = createMine [_ied_type, [_roadpos, _spread, random (360)] call BIS_fnc_relPos, [], 0];
|
||||
_ied_obj = createMine [_ied_type, _roadpos getRelPos [_spread, random 360], [], 0];
|
||||
_ied_obj setdir (random 360);
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {private _text = format ["[KP LIBERATION] [ASYMMETRIC] ied_manager.sqf -> IED %1 spawned at %2", _number, markerText _sector];_text remoteExec ["diag_log",2];};
|
||||
|
|
|
@ -12,7 +12,7 @@ if (!(_sector in KP_capture_sectors_already_activated)) then {
|
|||
|
||||
private _spawnpos = zeropos;
|
||||
while { _spawnpos distance zeropos < 1000 } do {
|
||||
_spawnpos = ( [ ( markerpos _sector), random 50, random 360 ] call BIS_fnc_relPos ) findEmptyPosition [10, 100, 'B_Heli_Transport_01_F'];
|
||||
_spawnpos = ((markerpos _sector) getRelPos [random 50, random 360]) findEmptyPosition [10, 100, 'B_Heli_Transport_01_F'];
|
||||
if ( count _spawnpos == 0 ) then { _spawnpos = zeropos; };
|
||||
};
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@ switch (typeOf _storage) do {
|
|||
};
|
||||
|
||||
_i = 0;
|
||||
_unload_pos = [_storage, _unload_distance, (getDir _storage) - 180] call BIS_fnc_relPos;
|
||||
_unload_pos = _storage getRelPos [_unload_distance, (getDir _storage) - 180];
|
||||
|
||||
while {!((nearestObjects [_unload_pos,KP_liberation_crates,1]) isEqualTo [])} do {
|
||||
_i = _i + 1;
|
||||
_unload_pos = [_storage, _unload_distance + _i * 1.8, (getDir _storage) - 180] call BIS_fnc_relPos;
|
||||
_unload_pos = _storage getRelPos [_unload_distance + _i * 1.8, (getDir _storage) - 180];
|
||||
};
|
||||
|
||||
sleep 0.5;
|
||||
|
|
|
@ -13,7 +13,7 @@ if ( _precise_position ) then {
|
|||
_spawnpos = [] + _sectorpos;
|
||||
} else {
|
||||
while { _spawnpos distance zeropos < 1000 } do {
|
||||
_spawnpos = ( [ _sectorpos, random 150, random 360 ] call bis_fnc_relpos ) findEmptyPosition [10, 100, 'B_Heli_Transport_01_F'];
|
||||
_spawnpos = (_sectorpos getRelPos [random 150, random 360]) findEmptyPosition [10, 100, 'B_Heli_Transport_01_F'];
|
||||
if ( count _spawnpos == 0 ) then { _spawnpos = zeropos; };
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
params [ "_sector", "_squadies_to_spawn" ];
|
||||
|
||||
private _sectorpos = [ getMarkerPos _sector, random 100, random 360 ] call BIS_fnc_relPos;
|
||||
private _sectorpos = (getMarkerPos _sector) getRelPos [random 100, random 360];
|
||||
|
||||
private _spawnpos = zeropos;
|
||||
while {_spawnpos distance zeropos < 1000} do {
|
||||
_spawnpos = ([_sectorpos, random 50, random 360] call BIS_fnc_relPos) findEmptyPosition [5, 100, "B_Heli_Light_01_F"];
|
||||
_spawnpos = (_sectorpos getRelPos [random 50, random 360]) findEmptyPosition [5, 100, "B_Heli_Light_01_F"];
|
||||
if (count _spawnpos == 0) then {_spawnpos = zeropos;};
|
||||
};
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ class Missions
|
|||
* Removed: Some old scripts which aren't needed anymore.
|
||||
* Tweaked: All `spawn compileFinal preprocessFileLineNumbers` replaced with `execVM`.
|
||||
* Tweaked: All `createGroup` now with activated `deleteWhenEmpty`.
|
||||
* Tweaked: All `BIS_fnc_relPos` replaced with `getRelPos`.
|
||||
* Fixed: Placement of buildings after save/load. Thanks to [Cre8or](https://github.com/Cre8or)
|
||||
|
||||
### 0.963 (05th January 2018)
|
||||
|
|
Loading…
Reference in New Issue