Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
## 0.3.2
- Added: Dragging horizontally on knob control

## 0.3.1
- Fixed: With Detached Cursor setting OFF, interaction cursor did not show
- Added: Settings for cursor shape and color
- Fixed: Addon settings doesn't show in MP

## 0.3.0
- Added: Settings for cursor shape and color
- Added: Dragging horizontally on knob control
- Added: Allow interactions while remote controlling
- Changed: Removed ACE Dependency
- Changed: Keybinds moved from CBA Keybinds to Arma Modded Keybinds
Expand Down
1 change: 1 addition & 0 deletions addons/core/functions/fnc_getVehicleConfig.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_getVehicleConfig
*
Expand Down
3 changes: 2 additions & 1 deletion addons/core/functions/fnc_hasModule.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_hasModule
*
Expand All @@ -15,7 +16,7 @@ private _vehicleModuleArray = _vehicle getVariable ["hct_modules", []];
private _isClass = if(!isNil "_className") then [{_vehicle isKindOf _className}, {true}];
private _hasModule = false;
{ // forEach _vehicleModuleArray
_name = _x # 0;
_name = _x # MODULEINDEX_MODULENAME;
if (_moduleName == _name) exitWith {
_hasModule = true;
};
Expand Down
2 changes: 2 additions & 0 deletions addons/core/functions/fnc_init.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "script_component.hpp"

["vehicle", {[hct_player, vehicle hct_player] call hct_core_fnc_vehicleChanged}, true] call CBA_fnc_addPlayerEventHandler;

hct_interaction_vehicleSwitchedEH = ["turret", {
Expand Down
1 change: 1 addition & 0 deletions addons/core/functions/fnc_load.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_load
*
Expand Down
1 change: 1 addition & 0 deletions addons/core/functions/fnc_loadAll.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_loadAll
*
Expand Down
5 changes: 3 additions & 2 deletions addons/core/functions/fnc_perFixed.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_perFixed
*
Expand Down Expand Up @@ -30,8 +31,8 @@ private _modules = (_vehicle getVariable ["hct_modules", []]);
private ["_func"];
{ //forEach vehicle hct_modules
sleep _moduleDelay;
if (_x # 1) then {
_func = missionNamespace getVariable (_x # 5);
if (_x # MODULEINDEX_STARTUP) then {
_func = missionNamespace getVariable (_x # MODULEINDEX_PERFIXED);
if (!isNil {_func}) then {[_vehicle] call _func;};
};
} forEach _modules;
Expand Down
5 changes: 3 additions & 2 deletions addons/core/functions/fnc_perFrame.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_perFrame
*
Expand Down Expand Up @@ -41,8 +42,8 @@ if (_frameTime > 1) exitWith {};

private ["_func"];
{ //forEach vehicle hct_modules
if (_x # 1) then {
_func = missionNamespace getVariable (_x # 3);
if (_x # MODULEINDEX_STARTUP) then {
_func = missionNamespace getVariable (_x # MODULEINDEX_PERFRAME);
if (!isNil {_func}) then {[_vehicle, _frameTime] call _func;};
};
} forEach (_vehicle getVariable ["hct_modules", []]);
5 changes: 3 additions & 2 deletions addons/core/functions/fnc_perSecond.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_perSecond
*
Expand Down Expand Up @@ -30,8 +31,8 @@ private _modules = (_vehicle getVariable ["hct_modules", []]);
private ["_func"];
{ //forEach vehicle hct_modules
sleep _moduleDelay;
if (_x # 1) then {
_func = missionNamespace getVariable (_x # 4);
if (_x # MODULEINDEX_STARTUP) then {
_func = missionNamespace getVariable (_x # MODULEINDEX_PERSECOND);
if (!isNil {_func}) then {[_vehicle] call _func;};
};
} forEach _modules;
Expand Down
5 changes: 3 additions & 2 deletions addons/core/functions/fnc_shutDownAll.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_core_fnc_setup
*
Expand Down Expand Up @@ -31,8 +32,8 @@ with uiNamespace do {

private ["_func"];
{ //forEach vehicle hct_modules
if (_x # 1) then {
_func = missionNamespace getVariable (_x # 5);
if (_x # MODULEINDEX_STARTUP) then {
_func = missionNamespace getVariable (_x # MODULEINDEX_SHUTDOWN);
if (!isNil {_func}) then {[_vehicle] call _func;};
};
_x set [1, false];
Expand Down
14 changes: 14 additions & 0 deletions addons/core/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@
#endif

#include "\z\HCT\addons\main\script_macros.hpp"

#define ANIMTYPE_NONE 0
#define ANIMTYPE_ANIM 1
#define ANIMTYPE_ASRC 2
#define ANIMTYPE_DOOR 3

#define MODULEINDEX_MODULENAME 0
#define MODULEINDEX_STARTUP 1
#define MODULEINDEX_SETUP 2
#define MODULEINDEX_PERFRAME 3
#define MODULEINDEX_PERSECOND 4
#define MODULEINDEX_PERFIXED 5
#define MODULEINDEX_DRAW3D 6
#define MODULEINDEX_SHUTDOWN 7
2 changes: 2 additions & 0 deletions addons/interaction/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ ADDON = false;
#include "XEH_PREP.hpp"
//PREP_RECOMPILE_END;

call FUNC(preInit);

ADDON = true;
2 changes: 0 additions & 2 deletions addons/interaction/XEH_preInit_server.sqf
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#include "script_component.hpp"
//only executed on server

call FUNC(preInit);
5 changes: 3 additions & 2 deletions addons/interaction/functions/fnc_draw3D.sqf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "script_component.hpp"
/*
* hct_interaction_fnc_Draw3D
*
Expand Down Expand Up @@ -62,8 +63,8 @@ if (!isNil "hct_interaction_knobHolding" && !hct_interaction_dragging) then {

private ["_func"];
{ //forEach vehicle hct_modules
if (_x # 1) then {
_func = missionNamespace getVariable (_x # 6);
if (_x # MODULEINDEX_STARTUP) then {
_func = missionNamespace getVariable (_x # MODULEINDEX_DRAW3D);
if (!isNil {_func}) then {[_vehicle, _frameTime] call _func;};
};
} forEach (_vehicle getVariable ["hct_modules", []]);
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 0
#define MINOR 3
#define PATCH 2
#define PATCH 1
#define BUILD 0
Loading