From 825a69ff028d8baf2d08d99a5026c13727fc18c9 Mon Sep 17 00:00:00 2001
From: Igor Kiselev
Date: Sun, 27 Aug 2023 10:42:00 +0300
Subject: [PATCH] minor civ plane tweaks, version
---
A3A/addons/core/Includes/script_version.hpp | 2 +-
.../scrt/Encounter/fn_encounter_civPlane.sqf | 36 +++++++++----------
.../fn_encounter_selectAndExecuteEvent.sqf | 2 +-
ForkChangelog.md | 6 +++-
README.md | 2 +-
5 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/A3A/addons/core/Includes/script_version.hpp b/A3A/addons/core/Includes/script_version.hpp
index 48443d2687..baaca9f856 100644
--- a/A3A/addons/core/Includes/script_version.hpp
+++ b/A3A/addons/core/Includes/script_version.hpp
@@ -1,4 +1,4 @@
#define MAJOR 2
#define MINOR 3
-#define PATCHLVL 0
+#define PATCHLVL 1
#define BUILD 0
diff --git a/A3A/addons/scrt/Encounter/fn_encounter_civPlane.sqf b/A3A/addons/scrt/Encounter/fn_encounter_civPlane.sqf
index 5c27b19bff..e963be2eff 100644
--- a/A3A/addons/scrt/Encounter/fn_encounter_civPlane.sqf
+++ b/A3A/addons/scrt/Encounter/fn_encounter_civPlane.sqf
@@ -18,27 +18,25 @@ private _originPosition = position _player;
Info_2("%1 will be used as center of the event at %2 position.", name _player, str _originPosition);
-private _finPosition = [_originPosition, 2500, (random 360)] call BIS_fnc_relPos;
+private _finPosition = [_originPosition, 3500, (random 360)] call BIS_fnc_relPos;
-private _spawnPosition = [_originPosition, 1400, 1600, 0, 0, 1] call BIS_fnc_findSafePos;
+private _spawnPosition = [_originPosition, 2400, 2600, 0, 0, 1] call BIS_fnc_findSafePos;
private _civPlaneData = [[(_spawnPosition select 0), (_spawnPosition select 1), 100 + random 200], 0, selectRandom (A3A_faction_civ get "vehiclesCivPlanes"), civilian] call A3A_fnc_spawnVehicle;
-private _PlaneVeh = _civPlaneData select 0;
-[_PlaneVeh, civilian] call A3A_fnc_AIVEHinit;
-private _PlaneCrew = _civPlaneData select 1;
-
-if (random 100 < 30) then {
- private _civ = [(_civPlaneData select 2), A3A_faction_civ get "unitPress", [0,0,0], [],0, "NONE"] call A3A_fnc_createUnit;
- _civ assignAsCargo _PlaneVeh;
- _civ moveInCargo _PlaneVeh;
-};
+private _planeVeh = _civPlaneData select 0;
+[_planeVeh, civilian] call A3A_fnc_AIVEHinit;
+private _planeCrew = _civPlaneData select 1;
-{[_x] spawn A3A_fnc_civilianInitEH} forEach _PlaneCrew;
-private _PlaneGroup = _civPlaneData select 2;
+{[_x] spawn A3A_fnc_civilianInitEH} forEach _planeCrew;
+private _planeGroup = _civPlaneData select 2;
-_groups pushBack _PlaneGroup;
-_vehicles pushBack _PlaneVeh;
+_groups pushBack _planeGroup;
+_vehicles pushBack _planeVeh;
-_PlaneVeh flyInHeight (550 + (random 75));
+private _height = 550 + (random 150);
+_planeVeh flyInHeight _height;
+_planeVeh setPosATL (_spawnPosition vectorAdd [0, 0, _height]);
+_planeVeh setDir ([_planeVeh, _originPosition] call BIS_fnc_dirTo);
+_planeVeh setVelocityModelSpace [0, 100, 0];
private _relativePositions = [];
@@ -48,18 +46,18 @@ private _relativePositions = [];
} forEach [0, 180];
{
- private _wp = _PlaneGroup addWaypoint [_x, _forEachIndex];
+ private _wp = _planeGroup addWaypoint [_x, _forEachIndex];
_wp setWaypointSpeed "NORMAL";
_wp setWaypointType "MOVE";
_wp setWaypointBehaviour "SAFE";
} forEach _relativePositions;
-private _wp3 = _PlaneGroup addWaypoint [_finPosition, 3];
+private _wp3 = _planeGroup addWaypoint [_finPosition, 3];
_wp3 setWaypointType "MOVE";
_wp3 setWaypointSpeed "NORMAL";
private _timeOut = time + 600;
-waitUntil { sleep 5; (currentWaypoint _PlaneGroup == 3) || (time > _timeOut) || !(canMove _PlaneVeh) || !alive (driver _PlaneVeh)};
+waitUntil { sleep 5; (currentWaypoint _planeGroup == 3) || (time > _timeOut) || !(canMove _planeVeh) || !alive (driver _planeVeh)};
{[_x] spawn A3A_fnc_vehDespawner} forEach _vehicles;
{[_x] spawn A3A_fnc_groupDespawner} forEach _groups;
diff --git a/A3A/addons/scrt/Encounter/fn_encounter_selectAndExecuteEvent.sqf b/A3A/addons/scrt/Encounter/fn_encounter_selectAndExecuteEvent.sqf
index 7881f86e7b..2a5ceaeb6e 100644
--- a/A3A/addons/scrt/Encounter/fn_encounter_selectAndExecuteEvent.sqf
+++ b/A3A/addons/scrt/Encounter/fn_encounter_selectAndExecuteEvent.sqf
@@ -32,7 +32,7 @@ switch (_eventType) do {
[[], "SCRT_fnc_encounter_civHeli"] call A3A_fnc_scheduler;
};
case (CIV_PLANE): {
- [[], "SCRT_fnc_encounter_civPLANE"] call A3A_fnc_scheduler;
+ [[], "SCRT_fnc_encounter_civPlane"] call A3A_fnc_scheduler;
};
case (POLICE): {
[[], "SCRT_fnc_encounter_police"] call A3A_fnc_scheduler;
diff --git a/ForkChangelog.md b/ForkChangelog.md
index cb3129685c..6ae5f158ef 100644
--- a/ForkChangelog.md
+++ b/ForkChangelog.md
@@ -1,8 +1,12 @@
# Changelog
+## 2.3.1
+### Additions
+- New civilian plane flyby random event
+
## 2.3
### Additions
-- Official Aegis support
+- Aegis support
- Ĺ umava terrain support
- New enemy group type - reconnaissance patrol, usually it has snipper and spotter in ghillie suits if possible, they may spawn in forests and other wilderness areas. If faction has no ghillie or other suit types, ordinary snipers and spotters will be used
- New Rivals random event - Helicopter Raid, they will try to drop some munition on your heads and then they will loiter in the area to finish survivors if there are any (some rivals faction have only drop part because of lacking required assets in their specific modsets)
diff --git a/README.md b/README.md
index 4f96d6d5f4..43842dd8cf 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
-
+