mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix misc issues with rallypoints
This commit is contained in:
parent
7c5a6538a9
commit
4cdf61ab9e
@ -6,15 +6,54 @@ class Extended_PreInit_EventHandlers {
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(HandleGear) {
|
||||
class ADDON {
|
||||
killed = QUOTE(_this call FUNC(handleKilled));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(HandleGear) {
|
||||
class ADDON {
|
||||
respawn = QUOTE(_this call FUNC(handleRespawn));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Init_EventHandlers {
|
||||
class ACE_Rallypoint_West {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_East {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_Independent {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_West_Base {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_East_Base {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_Independent_Base {
|
||||
class ADDON {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
class CfgVehicles {
|
||||
class Module_F;
|
||||
class ACE_ModuleRespawn : Module_F {
|
||||
class ACE_ModuleRespawn: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Respawn System";
|
||||
@ -8,20 +8,24 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Respawn_ca.paa));
|
||||
|
||||
class Arguments {
|
||||
class SavePreDeathGear {
|
||||
displayName = "Save Gear?";
|
||||
description = "Respawn with the gear a soldier had just before his death?";
|
||||
typeName = "BOOL";
|
||||
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { default = 1; name = "No"; value = 0; };
|
||||
};
|
||||
};
|
||||
|
||||
class RemoveDeadBodiesDisconnected {
|
||||
displayName = "Remove bodies?";
|
||||
description = "Remove player bodies after disconnect?";
|
||||
typeName = "BOOL";
|
||||
|
||||
class values {
|
||||
class Yes { default = 1; name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; };
|
||||
@ -30,7 +34,7 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_ModuleFriendlyFire : Module_F {
|
||||
class ACE_ModuleFriendlyFire: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Friendly Fire Messages";
|
||||
@ -38,11 +42,11 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_FriendlyFire_ca.paa));
|
||||
class Arguments {
|
||||
};
|
||||
|
||||
class Arguments {};
|
||||
};
|
||||
|
||||
class ACE_ModuleRallypoint : Module_F {
|
||||
class ACE_ModuleRallypoint: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Rallypoint System";
|
||||
@ -50,186 +54,8 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Rallypoint_ca.paa));
|
||||
class Arguments {
|
||||
};
|
||||
};
|
||||
|
||||
// rallypoints
|
||||
class FlagCarrier;
|
||||
class Flag_NATO_F : FlagCarrier {
|
||||
class ACE_Actions;
|
||||
};
|
||||
|
||||
class Flag_CSAT_F : FlagCarrier {
|
||||
class ACE_Actions;
|
||||
};
|
||||
|
||||
class Flag_AAF_F : FlagCarrier {
|
||||
class ACE_Actions;
|
||||
};
|
||||
|
||||
// static
|
||||
class ACE_Rallypoint_West: Flag_NATO_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint West Base";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class EventHandlers {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
class ACE_Actions : ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
selection = "";
|
||||
class ACE_Teleport {
|
||||
displayName = "Teleport to Rallypoint";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == west);
|
||||
statement = QUOTE([ARR_3(_player, side group _player, false)] call FUNC(teleportToRallypoint));
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_East: Flag_CSAT_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint East Base";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class EventHandlers {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
class ACE_Actions : ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
selection = "";
|
||||
class ACE_Teleport {
|
||||
displayName = "Teleport to Rallypoint";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == east);
|
||||
statement = QUOTE([ARR_3(_player, side group _player, false)] call FUNC(teleportToRallypoint));
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_Independent: Flag_AAF_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint Independent Base";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class EventHandlers {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
class ACE_Actions : ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
selection = "";
|
||||
class ACE_Teleport {
|
||||
displayName = "Teleport to Rallypoint";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == independent);
|
||||
statement = QUOTE([ARR_3(_player, side group _player, false)] call FUNC(teleportToRallypoint));
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// moveable
|
||||
class ACE_RallypointExit_West: Flag_NATO_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint West";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class EventHandlers {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
class ACE_Actions : ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
selection = "";
|
||||
class ACE_Teleport {
|
||||
displayName = "Teleport to Base";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == west);
|
||||
statement = QUOTE([ARR_3(_player, side group _player, true)] call FUNC(teleportToRallypoint));
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_RallypointExit_East: Flag_CSAT_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint East";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class EventHandlers {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
class ACE_Actions : ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
selection = "";
|
||||
class ACE_Teleport {
|
||||
displayName = "Teleport to Base";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == east);
|
||||
statement = QUOTE([ARR_3(_player, side group _player, true)] call FUNC(teleportToRallypoint));
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_RallypointExit_Independent: Flag_AAF_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint Independent";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class EventHandlers {
|
||||
init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; _this call FUNC(initRallypoint));
|
||||
};
|
||||
class ACE_Actions : ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
distance = 5;
|
||||
condition = "true";
|
||||
selection = "";
|
||||
class ACE_Teleport {
|
||||
displayName = "Teleport to Base";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == independent);
|
||||
statement = QUOTE([ARR_3(_player, side group _player, true)] call FUNC(teleportToRallypoint));
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
class Arguments {};
|
||||
};
|
||||
|
||||
// team leader
|
||||
@ -245,4 +71,140 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// rallypoints
|
||||
class FlagCarrier;
|
||||
class Flag_NATO_F: FlagCarrier {
|
||||
class ACE_Actions;
|
||||
};
|
||||
|
||||
class Flag_CSAT_F: FlagCarrier {
|
||||
class ACE_Actions;
|
||||
};
|
||||
|
||||
class Flag_AAF_F: FlagCarrier {
|
||||
class ACE_Actions;
|
||||
};
|
||||
|
||||
// static
|
||||
class ACE_Rallypoint_West_Base: Flag_NATO_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint West Base";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_Teleport {
|
||||
displayName = "$STR_ACE_Respawn_TeleportedToRallypoint";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == west);
|
||||
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_West')] call FUNC(teleportToRallypoint));
|
||||
position[] = {0,0,-1};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_East_Base: Flag_CSAT_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint East Base";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_Teleport {
|
||||
displayName = "$STR_ACE_Respawn_TeleportedToRallypoint";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == east);
|
||||
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_East')] call FUNC(teleportToRallypoint));
|
||||
position[] = {0,0,-1};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_Independent_Base: Flag_AAF_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint Independent Base";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_Teleport {
|
||||
displayName = "$STR_ACE_Respawn_TeleportedToRallypoint";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == independent);
|
||||
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_Independent')] call FUNC(teleportToRallypoint));
|
||||
position[] = {0,0,-1};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// moveable
|
||||
class ACE_Rallypoint_West: Flag_NATO_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint West";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_Teleport {
|
||||
displayName = "$STR_ACE_Respawn_TeleportedToBase";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == west);
|
||||
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_West_Base')] call FUNC(teleportToRallypoint));
|
||||
position[] = {0,0,-1};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_East: Flag_CSAT_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint East";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_Teleport {
|
||||
displayName = "$STR_ACE_Respawn_TeleportedToBase";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == east);
|
||||
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_East_Base')] call FUNC(teleportToRallypoint));
|
||||
position[] = {0,0,-1};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Rallypoint_Independent: Flag_AAF_F {
|
||||
XEH_ENABLED;
|
||||
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "Rallypoint Independent";
|
||||
vehicleClass = QGVAR(Rallypoints);
|
||||
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_Teleport {
|
||||
displayName = "$STR_ACE_Respawn_TeleportedToBase";
|
||||
distance = 4;
|
||||
condition = QUOTE(side group _player == independent);
|
||||
statement = QUOTE([ARR_3(_player,side group _player,'ACE_Rallypoint_Independent_Base')] call FUNC(teleportToRallypoint));
|
||||
position[] = {0,0,-1};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -26,8 +26,8 @@ _this spawn {
|
||||
_rallypoint = [
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_East", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_Independent", objNull]
|
||||
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
|
||||
] select ([west, east, independent] find _side) + 1;
|
||||
|
||||
if (isNull _rallypoint) exitWith {};
|
||||
@ -50,5 +50,5 @@ _this spawn {
|
||||
_marker setMarkerTextLocal format ["%1:%2", [date select 3, 2, 0] call CBA_fnc_FORMATNumber, [date select 4, 2, 0] call CBA_fnc_FORMATNumber];
|
||||
*/
|
||||
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(common,displayTextStructured);
|
||||
[localize "STR_ACE_Respawn_Deployed"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -76,6 +76,8 @@ if (_goggles != "") then {
|
||||
_unit addItemToVest _x;
|
||||
}forEach _vestitems;
|
||||
|
||||
private "_flagRemoveDummyBag";
|
||||
_flagRemoveDummyBag = false;
|
||||
|
||||
if(format["%1", _backpack] != "") then {
|
||||
_unit addBackpack _backpack;
|
||||
@ -87,6 +89,12 @@ if(format["%1", _backpack] != "") then {
|
||||
{
|
||||
_unit addItemToBackpack _x;
|
||||
} forEach _backpackitems;
|
||||
|
||||
} else {
|
||||
// dummy backpack to ensure mags being loaded
|
||||
_unit addBackpack "B_Kitbag_Base";
|
||||
|
||||
_flagRemoveDummyBag = true;
|
||||
};
|
||||
|
||||
|
||||
@ -138,6 +146,12 @@ if (_handgunweapon != "") then {
|
||||
};
|
||||
|
||||
|
||||
// remove dummy bagpack
|
||||
if (_flagRemoveDummyBag) then {
|
||||
removeBackpack _unit;
|
||||
};
|
||||
|
||||
|
||||
_assignedItems = _assignedItems - [_binocular];
|
||||
|
||||
// items
|
||||
|
@ -18,30 +18,19 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_side", "_toBase", "_rallypoint"];
|
||||
private ["_unit", "_side", "_rallypoint", "_toBase"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_side = _this select 1;
|
||||
_toBase = _this select 2;
|
||||
_rallypoint = _this select 2;
|
||||
|
||||
// rallypoint names are defined in CfgVehicles.hpp
|
||||
|
||||
_rallypoint = ([
|
||||
[
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_RallypointExit_West", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_East", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_Independent", objNull]
|
||||
],
|
||||
[
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
|
||||
]
|
||||
] select _toBase) select ([west, east, independent] find _side) + 1;
|
||||
_toBase = _rallypoint find "_Base" != -1;
|
||||
|
||||
_rallypoint = missionNamespace getVariable [_rallypoint, objNull],
|
||||
|
||||
if (isNull _rallypoint) exitWith {};
|
||||
|
||||
_unit setPosASL (getPosASL _rallypoint);
|
||||
_unit setPosASL getPosASL _rallypoint;
|
||||
[[localize "STR_ACE_Respawn_TeleportedToRallypoint", localize "STR_ACE_Respawn_TeleportedToBase"] select _toBase] call EFUNC(common,displayTextStructured);
|
||||
|
Loading…
Reference in New Issue
Block a user