This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
182 changed files
with
63,428 additions
and
62,412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
PREP(actionCondition); | ||
PREP(initCBASettings); | ||
PREP(initPlayerEvents); | ||
PREP(openParachute); | ||
PREP(parachuteController); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "script_component.hpp" | ||
|
||
/* | ||
this line is commented, otherwise it would disturb the linter. | ||
["LandVehicle", "init", FUNC(onInit), nil, nil, true] call CBA_fnc_addClassEventHandler; | ||
*/ | ||
|
||
if (!GVAR(on)) exitWith{}; | ||
|
||
if (hasinterface) then | ||
{ | ||
[] call FUNC(initPlayerEvents); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "script_component.hpp" | ||
|
||
ADDON = false; | ||
|
||
PREP_RECOMPILE_START; | ||
#include "XEH_PREP.hpp" | ||
PREP_RECOMPILE_END; | ||
|
||
ADDON = true; | ||
|
||
/* INITIALIZE GLOBAL VARS */ | ||
// list all global variables used within the component | ||
// define variable with default value! | ||
// GVAR(...) | ||
GVAR(actionID) = -1; | ||
|
||
// initialize CBA Settings | ||
[] call FUNC(initCBASettings); |
50 changes: 50 additions & 0 deletions
50
[J]OPT.Altis/autoparachute/functions/fnc_actionCondition.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* Description: | ||
* check condition for parachute action menu entry | ||
* | ||
* Author: | ||
* James | ||
* | ||
* Arguments: | ||
* 0: <OBJECT> the object to which action is attached or, if the object is a unit inside of vehicle, the vehicle | ||
* 1: <OBJECT> caller person to whom the action is shown (or not shown if condition returns false) | ||
* 2: <OBJECT> the original object to which the action is attached, regardless if the object/unit is in a vehicle or not | ||
* | ||
* Return Value: | ||
* <BOOLEAN> true - action is valid, false - otherwise | ||
* | ||
* Server only: | ||
* no | ||
* | ||
* Public: | ||
* no | ||
* | ||
* Global: | ||
* no | ||
* | ||
* Sideeffects: | ||
* remove action from player if condition is no longer true | ||
* open parachute if condition is false | ||
* | ||
* Example: | ||
* [player, player, player] call EFUNC(autoparachute,actionCondition); | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
/* PARAMS */ | ||
params ["_target", "_this", "_originalTarget"]; | ||
|
||
/* VALIDATION */ | ||
if !(_target isEqualTo _this) exitWith {false}; | ||
|
||
/* CODE BODY */ | ||
private _isWater = surfaceIsWater position _target; | ||
private _pos = [getPosATL _target, getPosASLW _target] select _isWater; | ||
|
||
if (_pos select 2 < GVAR(minHeight)) then | ||
{ | ||
false | ||
} else | ||
{ | ||
true | ||
} |
61 changes: 61 additions & 0 deletions
61
[J]OPT.Altis/autoparachute/functions/fnc_initCBASettings.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* Description: | ||
* initialize CBA settings | ||
* | ||
* Author: | ||
* James | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Server only: | ||
* no | ||
* | ||
* Public: | ||
* no - should be called only once from XEH_PreInit.sqf at mission start | ||
* | ||
* Global: | ||
* no | ||
* | ||
* Sideeffects: | ||
* yes - create a new setting in the game addons options (according to category and name) | ||
* | ||
* Example: | ||
* [] call EFUNC(beam,initCBASettings); | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
[ | ||
QGVAR(on), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting. | ||
"CHECKBOX", // setting type | ||
"Aktiviert die Autoparachute-Komponente", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. | ||
"OPT Komponenten", // Pretty name of the category where the setting can be found. Can be stringtable entry. | ||
true, // Default value <BOOLEAN> | ||
1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer | ||
{} // function that will be executed once on mission start and every time the setting is changed. | ||
] call CBA_Settings_fnc_init; | ||
|
||
if (!GVAR(on)) exitWith{}; | ||
|
||
[ | ||
QGVAR(minHeight), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting. | ||
"SLIDER", // setting type | ||
"Automatische Reißleine bei Höhe in m ü.NN.", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. | ||
"OPT Autoparachute", // Pretty name of the category where the setting can be found. Can be stringtable entry. | ||
[25, 200, 80, 0], // Default value <BOOLEAN> | ||
1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer | ||
{} // function that will be executed once on mission start and every time the setting is changed. | ||
] call CBA_Settings_fnc_init; | ||
|
||
[ | ||
QGVAR(openingTime), // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting. | ||
"SLIDER", // setting type | ||
"Zeit in Sek. bis Fallschirm sich öffnet", // Pretty name shown inside the ingame settings menu. Can be stringtable entry. | ||
"OPT Autoparachute", // Pretty name of the category where the setting can be found. Can be stringtable entry. | ||
[0, 60, 1.5, 1], // Default value <BOOLEAN> | ||
1, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer | ||
{} // function that will be executed once on mission start and every time the setting is changed. | ||
] call CBA_Settings_fnc_init; |
Oops, something went wrong.