mirror of
https://github.com/Ghostrider-DbD-/GMS_RC.git
synced 2024-08-30 16:02:11 +00:00
Support for positioning with vectors
This commit is contained in:
parent
e2e624e217
commit
8e19e1c926
@ -10,9 +10,4 @@
|
||||
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
*/
|
||||
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
||||
params["_object","_dir"];
|
||||
switch (typeName _dir) do
|
||||
{
|
||||
case "SCALAR": {_object setDir _dir};
|
||||
case "ARRAY": {_object setVectorDirAndUp _dir};
|
||||
};
|
||||
_this call GMSCore_fnc_setDirUp;
|
@ -20,7 +20,7 @@ if (GMS_simulationManager isEqualTo GMS_useDynamicSimulationManagement) exitWith
|
||||
// wake groups up if needed.
|
||||
{
|
||||
private _group = _x;
|
||||
private _nearplayer = [getPosATL (leader _group),GMS_simulationEnabledDistance] call GMS_fnc_nearestPlayers;
|
||||
private _nearplayer = [getPosATL (leader _group),GMS_simulationEnabledDistance] call GMSCore_fnc_nearestPlayers;
|
||||
if !(_nearPlayer isEqualTo []) then
|
||||
{
|
||||
_group reveal [(_nearplayer select 0),(_group knowsAbout (_nearPlayer select 0)) + 0.001]; // Force simulation on
|
||||
@ -33,7 +33,7 @@ if (GMS_simulationManager isEqualTo GMS_useBlckeaglsSimulationManager) then
|
||||
|
||||
{
|
||||
private _group = _x;
|
||||
private _nearplayer = [getPosATL (leader _group),GMS_simulationEnabledDistance] call GMS_fnc_nearestPlayers;
|
||||
private _nearplayer = [getPosATL (leader _group),GMS_simulationEnabledDistance] call GMSCore_fnc_nearestPlayers;
|
||||
if !(_nearplayer isEqualTo []) then
|
||||
{
|
||||
if !(simulationEnabled (leader _group)) then
|
||||
|
@ -225,6 +225,10 @@ private _missionData = [
|
||||
|
||||
#define spawnPara -1
|
||||
GMS_initializedMissionsList pushBack [_key, missionTimeoutAt, triggered, _missionData, _missionConfigs, spawnPara,_isStatic];
|
||||
|
||||
// Repair any damage done by prior activities.
|
||||
{_x setDamage 0} forEach ( nearestObjects [_coords, ["Building"], 500]);
|
||||
|
||||
//[format["_initializeMission (163): count GMS_initializedMissionsList = %1",count GMS_initializedMissionsList]] call GMS_fnc_log;
|
||||
_initialized = 1;
|
||||
_initialized
|
@ -44,15 +44,14 @@ private _hiddenObjs = [];
|
||||
|
||||
_obj setPosATL _objPos;
|
||||
[_obj] call GMSCore_fnc_emptyObjectInventory;
|
||||
_newObjs pushback _obj;
|
||||
[_obj, _dir] call GMS_fnc_setDirUp;
|
||||
_obj setVectorUp [0,0,1];
|
||||
[_obj, _dir] call GMSCore_fnc_setDirUp;
|
||||
_obj enableDynamicSimulation _sim;
|
||||
_obj allowDamage _dam;
|
||||
if ((typeOf _obj) isKindOf "LandVehicle" || {(typeOf _obj) isKindOf "Air" || {(typeOf _obj) isKindOf "Ship"}}) then
|
||||
{
|
||||
[_obj] call GMS_fnc_configureMissionVehicle;
|
||||
};
|
||||
_newObjs pushback _obj;
|
||||
} forEach _objects;
|
||||
|
||||
[_newObjs,_hiddenObjs];
|
||||
|
@ -54,8 +54,6 @@ private _emplacedWepData = +_missionEmplacedWeapons; // So we dont overwrite t
|
||||
_empGroup setBehaviour "COMBAT";
|
||||
_empGroup setVariable ["soldierType","emplaced"];
|
||||
|
||||
// TODO: recode to use GMS_fnc to create vehicle
|
||||
//private _wep = [_static,_pos] call GMS_fnc_spawnVehicle;
|
||||
/*
|
||||
["_className",""], // Clasname of vehicle to be spawned
|
||||
["_spawnPos",[0,0,0]], // selfevident
|
||||
@ -68,24 +66,18 @@ private _emplacedWepData = +_missionEmplacedWeapons; // So we dont overwrite t
|
||||
["_vehHitCode",[]],
|
||||
["_vehKilledCode",[]]
|
||||
*/
|
||||
//_wep setVariable["GRG_vehType","emplaced"];
|
||||
//_wep setPosATL _pos;
|
||||
//_wep setdir _dir;
|
||||
|
||||
// TODO: recode to use GMS_fnc to handle this if needed
|
||||
//[_wep,2] call GMS_fnc_configureMissionVehicle;
|
||||
#define height 0
|
||||
#define removeFuel 0
|
||||
#define vehHitCode []
|
||||
#define vehKilledCode []
|
||||
private _damage = if (GMS_killEmptyStaticWeapons) then {1} else {0};
|
||||
private _releaseToPlayers = if (GMS_killEmptyStaticWeapons) then {false} else {true};
|
||||
private _wep = [_static,_pos,_dir,height,_damage,removeFuel,_releaseToPlayers,GMS_vehicleDeleteTimer,vehHitCode,vehKilledCode] call GMSCore_fnc_spawnPatrolVehicle;
|
||||
private _wep = [_static,_pos,_dir, height, _damage, removeFuel, _releaseToPlayers, GMS_vehicleDeleteTimer, vehHitCode, vehKilledCode] call GMSCore_fnc_spawnPatrolVehicle;
|
||||
_wep setVariable["GMS_vehType","emplaced"];
|
||||
_emplacedWeps pushback _wep;
|
||||
[_wep,_empGroup] call GMSCore_fnc_loadVehicleCrew;
|
||||
//diag_log format["_spawnEmplacedWeaponArray(91): _wep = %1 | getPos _wep = %2 | _static = %3",_wep, getPosATL _wep, _static];
|
||||
//_gunner setVariable["GRG_vehType","emplaced"];
|
||||
|
||||
_emplacedAI append (units _empGroup);
|
||||
} else {
|
||||
[format["GMS_fnc_spawnEmplacedWeaponArray: Invalid classname %1 used in _missionEmplacedWeapons", _static],"warning"] call GMS_fnc_log;
|
||||
|
@ -60,7 +60,7 @@ private _cratesSpawned = [];
|
||||
|
||||
private _pos = _coords vectorAdd _crateOffset;
|
||||
private _crate = [_pos,_crateType] call GMS_fnc_spawnCrate;
|
||||
[_crate, _crateDir] call GMS_fnc_setDirUp;
|
||||
[_crate, _crateDir] call GMSCore_fnc_setDirUp;
|
||||
_crate setVariable["lootArray",_lootArray];
|
||||
_crate setVariable["lootCounts",_lootCounts];
|
||||
_crate setVariable["difficulty",_difficulty];
|
||||
|
@ -19,7 +19,7 @@ private _vehs = [];
|
||||
{
|
||||
_x params["_vehType","_vehOffset",["_dir",0],"_lootArray","_lootCounts"];
|
||||
_veh = [_vehType, _coords vectorAdd _vehOffset] call GMS_fnc_spawnVehicle;
|
||||
[_veh, _dir] call GMS_fnc_setDirUp;
|
||||
[_veh, _dir] call GMSCore_fnc_setDirUp;
|
||||
_veh lock _lock;
|
||||
if (_loadCrateTiming isEqualTo "atMissionSpawnGround") then
|
||||
{
|
||||
|
@ -15,11 +15,10 @@
|
||||
params["_center","_objects","_relative"];
|
||||
private _spawnedObjects = [];
|
||||
{
|
||||
_x params["_className","_relPos","_dir","_booleans"];
|
||||
_x params["_className","_relPos","_dir"];
|
||||
private _objPos = _center vectorAdd _relPos;
|
||||
private _obj = createSimpleObject [_className,ATLToASL _objPos];
|
||||
_obj setDir _dir;
|
||||
_obj setVectorUp [0,0,1];
|
||||
[_obj, _dir] call GMSCore_fnc_setDirUp;
|
||||
_spawnedObjects pushBack _obj;
|
||||
} forEach _objects;
|
||||
_spawnedObjects
|
@ -12,7 +12,7 @@
|
||||
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
||||
params["_vehicle","_searchRadius","_detectionOdds"];
|
||||
private["_player","_detectionOdds","_nearbyPlayers","_knowsAbout","_cansee","_knowledgeGained"];
|
||||
_nearbyPlayers = [getPosATL _vehicle, _vehicle getVariable["GMS_vehicleSearchRange",500]] call GMS_fnc_nearestPlayers;
|
||||
_nearbyPlayers = [getPosATL _vehicle, _vehicle getVariable["GMS_vehicleSearchRange",500]] call GMSCore_fnc_nearestPlayers;
|
||||
|
||||
switch GMS_revealMode do {
|
||||
case "detailed": {
|
||||
|
@ -9,7 +9,7 @@
|
||||
http://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
*/
|
||||
|
||||
#include "GMS_defines.hpp"
|
||||
#include "\GMS\Compiles\Init\GMS_defines.hpp"
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// prevent the system from being started twice
|
||||
|
@ -121,10 +121,10 @@ switch (GMSCore_modType) do
|
||||
GMS_rewardsOrange = [[12,20],[20,25]];
|
||||
|
||||
// Amount of tabs added to each mission crate
|
||||
GMS_crateMoneyBlue = [1400,2150];
|
||||
GMS_crateMoneyBlue = [1800,2150];
|
||||
GMS_crateMoneyRed = [3175, 5300];
|
||||
GMS_crateMoneyGreen = [16300, 21500];
|
||||
GMS_crateMoneyOrange = [23500, 24750];
|
||||
GMS_crateMoneyOrange = [23500, 27750];
|
||||
|
||||
GMS_rewardsNotifications = ["dynamicText"];
|
||||
|
||||
@ -149,7 +149,7 @@ switch (GMSCore_modType) do
|
||||
GMS_showCountAliveAI = true;
|
||||
|
||||
// radius within whih missions are triggered. The trigger causes the crate and AI to spawn.
|
||||
GMS_TriggerDistance = 1500;
|
||||
GMS_TriggerDistance = 2000;
|
||||
|
||||
//Minimum distance between missions
|
||||
GMS_MinDistanceFromMission = 1200;
|
||||
@ -237,7 +237,7 @@ switch (GMSCore_modType) do
|
||||
GMS_useMines = false; // when true mines are spawned around the mission area. these are cleaned up when a player reaches the crate. Turn this off if you have vehicle patrols.
|
||||
GMS_cleanupCompositionTimer = 60*30; // Mission objects will be deleted after the mission is completed after a deley set by this timer.
|
||||
GMS_cleanUpLootChests = false; // when true, loot crates will be deleted together with other mission objects.
|
||||
GMS_MissionTimeout = 90*90; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting.
|
||||
GMS_MissionTimeout = 60*60; // 60 min - missions will timeout and respawn in another location. This prevents missions in impossible locations from persisting.
|
||||
|
||||
///////////////////////////////
|
||||
// Paratroop Settings
|
||||
@ -302,7 +302,7 @@ switch (GMSCore_modType) do
|
||||
GMS_patrolHelisGreen = _GMS_armed_hellcats + _cup_Helis_missiles; // _GMS_armed_orcas + _GMS_armed_ghosthawks; //_GMS_littleBirds;
|
||||
GMS_noPatrolHelisGreen = 1;
|
||||
|
||||
GMS_chanceHeliPatrolOrange = 0.90;
|
||||
GMS_chanceHeliPatrolOrange = 0.95;
|
||||
GMS_patrolHelisOrange = _GMS_armed_heavyAttackHelis + _GMS_armed_attackHelis; //_GMS_littleBirds;
|
||||
GMS_noPatrolHelisOrange = 1;
|
||||
|
||||
@ -334,20 +334,20 @@ switch (GMSCore_modType) do
|
||||
////////////////////
|
||||
|
||||
// Maximum number of missions shown on the map at any one time.
|
||||
GMS_maxSpawnedMissions = 11;
|
||||
GMS_maxSpawnedMissions = 9;
|
||||
|
||||
//Set to -1 to disable. Values of 2 or more force the mission spawner to spawn copies of that mission - this feature is not recommended because you may run out of available groups.
|
||||
GMS_enableOrangeMissions = 1;
|
||||
GMS_enableGreenMissions = 2;
|
||||
GMS_enableGreenMissions = 1;
|
||||
GMS_enableRedMissions = 2;
|
||||
GMS_enableBlueMissions = 1;
|
||||
GMS_enableBlueMissions = -1;
|
||||
GMS_numberUnderwaterDynamicMissions = 0; // Values from -1 (no UMS) to N (N Underwater missions will be spawned; static UMS units and subs will be spawned.
|
||||
GMS_enableStaticMissions = 2;
|
||||
GMS_enableStaticMissions = 1;
|
||||
|
||||
#ifdef GRGserver
|
||||
GMS_enableHunterMissions = 1;
|
||||
GMS_enableScoutsMissions = 2;
|
||||
GMS_maxcrashsites = 2;
|
||||
GMS_maxcrashsites = 1;
|
||||
#endif
|
||||
|
||||
////////////////////
|
||||
@ -581,15 +581,15 @@ switch (GMSCore_modType) do
|
||||
**************************************************************/
|
||||
//This defines the skill, minimum/Maximum number of AI and how many AI groups are spawned for each mission type
|
||||
// Orange Missions
|
||||
GMS_MinAI_Orange = 18;
|
||||
GMS_MaxAI_Orange = 23;
|
||||
GMS_MinAI_Orange = 17;
|
||||
GMS_MaxAI_Orange = 22;
|
||||
GMS_AIGrps_Orange = 5;
|
||||
GMS_SkillsOrange = [
|
||||
[0.20], // aiming accuracy
|
||||
[0.75,0.85], // aiming speed
|
||||
[0.25], // aiming shake
|
||||
1.0, // spot distance
|
||||
0.89, // spot time
|
||||
0.92, // spot time
|
||||
1.00, // courage
|
||||
1.00, // reload speed
|
||||
1.00, // commanding
|
||||
@ -597,8 +597,8 @@ switch (GMSCore_modType) do
|
||||
];
|
||||
|
||||
// Green Missions
|
||||
GMS_MinAI_Green = 14;
|
||||
GMS_MaxAI_Green = 19;
|
||||
GMS_MinAI_Green = 13;
|
||||
GMS_MaxAI_Green = 18;
|
||||
GMS_AIGrps_Green = 4;
|
||||
GMS_SkillsGreen = [
|
||||
[0.18], // aiming accuracy
|
||||
|
@ -29,11 +29,13 @@ switch (toLower(worldName)) do
|
||||
[[24127.771,16169.194,0],1800], // HOLY DIVER
|
||||
[[12823.13,16681.56],1200], // MIL HILL
|
||||
[[8713.47,23018.19],3200], // NW MILI
|
||||
[[10969.26,8490.82],2400], // STRONGHOLD
|
||||
[[20788.121,7233.124],1800], // WAR ENSEMBLE
|
||||
[[23300,18800,0],950], // FLATS SPREAD
|
||||
[[16696.7,13598,0],2000], // CHELO
|
||||
[[20917.549,19239.043,0],1600] // CLIT
|
||||
[[8308.293,7260.224],3600], // STRONGHOLD
|
||||
[[20788.121,7233.124],1500], // WAR ENSEMBLE
|
||||
[[23300,18800,0],900], // FLATS SPREAD
|
||||
[[6094.97,12612.9],2200], // WEST DUMP
|
||||
[[6384.37,16240.63],2200], //KORE
|
||||
[[16696.7,13598,0],1800], // CHELO
|
||||
[[20917.549,19239.043,0],1800] // CLIT
|
||||
];
|
||||
};
|
||||
case "tanoa": {
|
||||
|
@ -58,12 +58,12 @@ switch (toLower (worldName)) do
|
||||
_nightTime = abs(24 - _daylight);
|
||||
_time = dayTime;
|
||||
_serverUpTime = 8;
|
||||
GMS_enableOrangeMissions = 1;
|
||||
GMS_enableOrangeMissions = 0;
|
||||
GMS_enableGreenMissions = 1;
|
||||
GMS_enableRedMissions = 1;
|
||||
GMS_enableBlueMissions = 1;
|
||||
GMS_enableHunterMissions = 1;
|
||||
GMS_enableScoutsMissions = 1;
|
||||
GMS_enableRedMissions = 0;
|
||||
GMS_enableBlueMissions = 0;
|
||||
GMS_enableHunterMissions = 0;
|
||||
GMS_enableScoutsMissions = 0;
|
||||
GMS_maxCrashSites = -1; // recommended settings: 3 for Altis, 2 for Tanoa, 1 for smaller maps. Set to -1 to disable
|
||||
|
||||
GMS_timeAcceleration = true; // When true, time acceleration will be periodically updated based on amount of daylight at that time according to the values below.
|
||||
@ -147,14 +147,14 @@ if (GMS_debugLevel > 0) then {
|
||||
//GMS_mainThreadUpdateInterval = 10;
|
||||
GMS_launchersPerGroup = 1;
|
||||
|
||||
GMS_enableOrangeMissions = 0;
|
||||
GMS_enableGreenMissions = 0; // 10-02-2023 Tested with mission list= "FieldCamp", "FieldHQ", "factory", "fortification", "Camp_Moreell", "lager"
|
||||
GMS_enableRedMissions = 0; // 10-2-2023 Tested with mission list= "fuelDepot", "junkyardWilly", "TraderBoss", "carThieves", "Ammunition_depot", "IDAP", "Outpost", "Service_Point"
|
||||
GMS_enableBlueMissions = 0; // 10-2-2023 Tested with mission list= "sniperBase", "survivalSupplies", "Service_point", and "default"
|
||||
GMS_enableOrangeMissions = 1;
|
||||
GMS_enableGreenMissions = 1; // 10-02-2023 Tested with mission list= "FieldCamp", "FieldHQ", "factory", "fortification", "Camp_Moreell", "lager"
|
||||
GMS_enableRedMissions = 1; // 10-2-2023 Tested with mission list= "fuelDepot", "junkyardWilly", "TraderBoss", "carThieves", "Ammunition_depot", "IDAP", "Outpost", "Service_Point"
|
||||
GMS_enableBlueMissions = 1; // 10-2-2023 Tested with mission list= "sniperBase", "survivalSupplies", "Service_point", and "default"
|
||||
GMS_numberUnderwaterDynamicMissions = 0;
|
||||
GMS_enableHunterMissions = 1;
|
||||
GMS_enableScoutsMissions = 1;
|
||||
GMS_enableStaticMissions = 1;
|
||||
GMS_enableStaticMissions = 5;
|
||||
GMS_maxCrashSites = 0;
|
||||
|
||||
GMS_noPatrolHelisBlue = 0;
|
||||
|
@ -33,6 +33,10 @@ The static loot system and dynamic loot system are gone. THese outlived thier us
|
||||
I have kept the change log as a bit of history for those interested in development of this mission system.
|
||||
Significant Changes:
|
||||
|
||||
Version = "7.18" Build = "273" Date = "10-20-2023"
|
||||
Added full support for vector-based positioning.
|
||||
|
||||
|
||||
Version 7.166 Build 271
|
||||
ADDED An optional timeout message (See \Missions\Scouts\scouts.sqf for an example)
|
||||
CHANGED how deletion of mission completion markers by moving schedule deletion of these markers to GMSCore
|
||||
|
@ -12,9 +12,9 @@
|
||||
*/
|
||||
|
||||
class GMSBuild {
|
||||
Version = "7.17";
|
||||
Build = "272";
|
||||
Date = "10-16-2023";
|
||||
Version = "7.18";
|
||||
Build = "273";
|
||||
Date = "10-20-2023";
|
||||
};
|
||||
|
||||
class CfgPatches {
|
||||
@ -29,14 +29,14 @@ class CfgPatches {
|
||||
class CfgFunctions {
|
||||
class GMS {
|
||||
class startup {
|
||||
file = "\GMS\Compiles\Init";
|
||||
file = "GMS\Compiles\Init";
|
||||
class init {
|
||||
postInit = 1;
|
||||
};
|
||||
};
|
||||
|
||||
class functions {
|
||||
file = "\GMS\Compiles\Functions";
|
||||
file = "GMS\Compiles\Functions";
|
||||
class broadcastServerFPS {};
|
||||
class cleanEmptyGroups {};
|
||||
class countAliveAI {};
|
||||
@ -56,15 +56,14 @@ class CfgFunctions {
|
||||
class messagePlayers {};
|
||||
class missionCompleteMarker {};
|
||||
class msgIED {};
|
||||
class nearestPlayers {};
|
||||
|
||||
//class nearestPlayers {};
|
||||
class restoreHiddenObjects {};
|
||||
class setDirUp {};
|
||||
//class setDirUp {};
|
||||
class spawnMarker {};
|
||||
class updateMarkerAliveCount {};
|
||||
};
|
||||
class groups {
|
||||
file = "\GMS\Compiles\Groups";
|
||||
file = "GMS\Compiles\Groups";
|
||||
class checkGroupWaypointStatus {};
|
||||
class cleanEmptyGroups {};
|
||||
class createGroup {}; // Kept for backwards compatability with static missions if these are kept and not updated.
|
||||
@ -77,7 +76,7 @@ class CfgFunctions {
|
||||
class spawnGroup {};
|
||||
};
|
||||
class missions {
|
||||
file = "\GMS\Compiles\Missions";
|
||||
file = "GMS\Compiles\Missions";
|
||||
class addMIssionToQue {};
|
||||
//class crateMoved {};
|
||||
class endMission {};
|
||||
@ -124,7 +123,7 @@ class CfgFunctions {
|
||||
class spawnSurfacePatrol {};
|
||||
};
|
||||
class units {
|
||||
file = "\GMS\Compiles\Units";
|
||||
file = "GMS\Compiles\Units";
|
||||
class cleanupAliveAI {};
|
||||
class deleteAI {};
|
||||
class removeAllAIgear {};
|
||||
@ -134,11 +133,11 @@ class CfgFunctions {
|
||||
class unitKilled {};
|
||||
};
|
||||
class Utils {
|
||||
file = "\GMS\Compiles\Utils";
|
||||
file = "GMS\Compiles\Utils";
|
||||
class log {};
|
||||
};
|
||||
class vehicles {
|
||||
file = "\GMS\Compiles\Vehicles";
|
||||
file = "GMS\Compiles\Vehicles";
|
||||
class alertVehicles {};
|
||||
class deleteAIVehicle {};
|
||||
class checkForEmptyVehicle {};
|
||||
|
Loading…
Reference in New Issue
Block a user