mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2026-08-27 23:15:18 +00:00
AWACS aircraft now spawned near the centerpoint of all mission player slots
This commit is contained in:
@@ -232,6 +232,7 @@ The core script is quite simple and small, I probably won't need too much help w
|
|||||||
- Added "Using the mission menu" section to this README file, detailing all available commands
|
- Added "Using the mission menu" section to this README file, detailing all available commands
|
||||||
- Added "weapons introduction date" table for upcoming "time period" setting (datamined from Briefing Room, many thanks to @john681611)
|
- Added "weapons introduction date" table for upcoming "time period" setting (datamined from Briefing Room, many thanks to @john681611)
|
||||||
- All AI aircraft now despawned on landing to free CPU cycles and allow space for new aircraft
|
- All AI aircraft now despawned on landing to free CPU cycles and allow space for new aircraft
|
||||||
|
- AWACS aircraft now spawned near the centerpoint of all mission player slots
|
||||||
- Changed AWACS aircraft detection logic (a tiny bit less realistic but more efficient)
|
- Changed AWACS aircraft detection logic (a tiny bit less realistic but more efficient)
|
||||||
- Changed some UTF-8 symbols in F10 menu, added UTF-8 symbol for "Objectives" submenu
|
- Changed some UTF-8 symbols in F10 menu, added UTF-8 symbol for "Objectives" submenu
|
||||||
- Fixed missing airbase name in "aircraft landed safely" messages
|
- Fixed missing airbase name in "aircraft landed safely" messages
|
||||||
|
|||||||
@@ -103,11 +103,18 @@ do
|
|||||||
local awacsUnits = Library.factions.getUnits(TUM.settings.getPlayerFaction(), DCSEx.enums.unitFamily.PLANE_AWACS, 1)
|
local awacsUnits = Library.factions.getUnits(TUM.settings.getPlayerFaction(), DCSEx.enums.unitFamily.PLANE_AWACS, 1)
|
||||||
awacsCallsign = "AWACS"
|
awacsCallsign = "AWACS"
|
||||||
|
|
||||||
|
local awacsSpawnPoint = DCSEx.envMission.getPlayerGroupsCenterPoint(TUM.settings.getPlayerCoalition())
|
||||||
|
if awacsSpawnPoint then
|
||||||
|
awacsSpawnPoint = DCSEx.math.randomPointInCircle(awacsSpawnPoint, DCSEx.converter.nmToMeters(10), DCSEx.converter.nmToMeters(5))
|
||||||
|
else
|
||||||
|
awacsSpawnPoint = TUM.territories.getTerritoryCenter(TUM.settings.getPlayerCoalition())
|
||||||
|
end
|
||||||
|
|
||||||
if awacsUnits and #awacsUnits > 0 then
|
if awacsUnits and #awacsUnits > 0 then
|
||||||
local groupInfo = DCSEx.unitGroupMaker.create(
|
local groupInfo = DCSEx.unitGroupMaker.create(
|
||||||
TUM.settings.getPlayerCoalition(),
|
TUM.settings.getPlayerCoalition(),
|
||||||
Group.Category.AIRPLANE,
|
Group.Category.AIRPLANE,
|
||||||
TUM.territories.getTerritoryCenter(TUM.settings.getPlayerCoalition()),
|
awacsSpawnPoint,
|
||||||
{ DCSEx.table.getRandom(awacsUnits) },
|
{ DCSEx.table.getRandom(awacsUnits) },
|
||||||
{
|
{
|
||||||
immortal = true,
|
immortal = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user