mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/KoffeinFlummi/ACE3 into repair
This commit is contained in:
commit
4077ad3667
@ -6,7 +6,7 @@
|
||||
displayName = "$STR_ACE_Attach_AttachDetach"; \
|
||||
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
|
||||
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
||||
exceptions[] = {"isNotDragging"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 0; \
|
||||
icon = PATHTOF(UI\attach_ca.paa); \
|
||||
@ -16,7 +16,7 @@
|
||||
displayName = "$STR_ACE_Attach_Detach"; \
|
||||
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
|
||||
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"}; \
|
||||
exceptions[] = {"isNotDragging"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 0; \
|
||||
icon = PATHTOF(UI\detach_ca.paa); \
|
||||
@ -57,7 +57,7 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_Attach_AttachDetach";
|
||||
condition = QUOTE(([ARR_3(_player, _player, '')] call FUNC(canAttach)));
|
||||
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(openAttachUI); );
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
exceptions[] = {"isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\attach_ca.paa);
|
||||
@ -67,7 +67,7 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_Attach_Detach";
|
||||
condition = QUOTE(([ARR_2(_player, _player)] call FUNC(canDetach)));
|
||||
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(detach) );
|
||||
exceptions[] = {"ACE_Drag_isNotDragging"};
|
||||
exceptions[] = {"isNotDragging"};
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\detach_ca.paa);
|
||||
|
@ -6,7 +6,7 @@ class CfgPatches {
|
||||
weapons[] = {"ACE_IR_Strobe_Item"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","eRazeri","CAA-Picard"};
|
||||
author[] = {"KoffeinFlummi","eRazeri","esteldunedain"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: eRazeri and CAA-Picard
|
||||
* Author: eRazeri and esteldunedain
|
||||
* Attach an item to the unit
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: eRazeri and CAA-Picard
|
||||
* Author: eRazeri and esteldunedain
|
||||
* Detach an item from a unit
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -39,7 +39,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
|
||||
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
exceptions[] = {"isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.3;
|
||||
@ -50,7 +50,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
|
||||
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
exceptions[] = {"isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.2;
|
||||
@ -74,7 +74,7 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_Captives_StopEscorting";
|
||||
condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting));
|
||||
statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive));
|
||||
exceptions[] = {QGVAR(isNotEscorting)};
|
||||
exceptions[] = {"isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
priority = 2.3;
|
||||
hotkey = "C";
|
||||
@ -91,7 +91,7 @@ class CfgVehicles {
|
||||
displayName = "$STR_ACE_Captives_StopSurrendering";
|
||||
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
|
||||
statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
|
||||
exceptions[] = {QGVAR(isNotSurrendering)};
|
||||
exceptions[] = {"isNotSurrendering"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
};
|
||||
@ -107,7 +107,7 @@ class CfgVehicles {
|
||||
distance = 4; \
|
||||
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
|
||||
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
|
||||
exceptions[] = {QGVAR(isNotEscorting)}; \
|
||||
exceptions[] = {"isNotEscorting"}; \
|
||||
showDisabled = 0; \
|
||||
priority = 1.2; \
|
||||
hotkey = "L"; \
|
||||
@ -178,7 +178,7 @@ class CfgVehicles {
|
||||
curatorCost = 0; //???
|
||||
isGlobal = 1; //run global
|
||||
isTriggerActivated = 1; //Wait for triggers
|
||||
// icon = QUOTE(PATHTOF(ui\todo.paa));
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa));
|
||||
functionPriority = 0;
|
||||
class Arguments {};
|
||||
class ModuleDescription: ModuleDescription {
|
||||
|
BIN
addons/captives/UI/Icon_Module_Make_Unit_Surrender_ca.paa
Normal file
BIN
addons/captives/UI/Icon_Module_Make_Unit_Surrender_ca.paa
Normal file
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
|
||||
class CfgActions {
|
||||
// fixes pick up action on mine detectors, because all ACE items are of that simulationClass and BI doesn't seem to care
|
||||
class None;
|
||||
class TakeWeapon: None {
|
||||
show = 0;
|
@ -42,19 +42,3 @@ class Extended_Respawn_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(dropObject) {
|
||||
Killed = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_GetIn_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(dropObject) {
|
||||
GetIn = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
76
addons/common/CfgMoves.hpp
Normal file
76
addons/common/CfgMoves.hpp
Normal file
@ -0,0 +1,76 @@
|
||||
|
||||
class CfgMovesBasic {
|
||||
class Default;
|
||||
class Actions {
|
||||
// fixes grab animation with equipped pistol
|
||||
class NoActions;
|
||||
class PistolStandActions: NoActions {
|
||||
grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
|
||||
};
|
||||
class LauncherKneelActions: NoActions {
|
||||
grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
|
||||
};
|
||||
class CivilStandActions: NoActions {
|
||||
grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class AgonyBase;
|
||||
class AgonyBaseRfl;
|
||||
class StandBase;
|
||||
class HealBase;
|
||||
|
||||
class States {
|
||||
// fixes being able to reload in some animations, can't remember now what exactly
|
||||
class AinjPfalMstpSnonWnonDnon_carried_Down: AgonyBase {
|
||||
canReload = 0;
|
||||
};
|
||||
class AinjPfalMstpSnonWnonDnon_carried_Up: AgonyBase {
|
||||
canReload = 0;
|
||||
};
|
||||
class AinjPfalMstpSnonWrflDnon_carried_Down: AgonyBase {
|
||||
canReload = 0;
|
||||
};
|
||||
class AinjPfalMstpSnonWrflDnon_carried_Up: AgonyBaseRfl {
|
||||
canReload = 0;
|
||||
};
|
||||
|
||||
class AmovPpneMstpSnonWnonDnon_injured;
|
||||
class AinjPpneMstpSnonWnonDnon: AmovPpneMstpSnonWnonDnon_injured {
|
||||
canReload = 0;
|
||||
};
|
||||
class AmovPpneMstpSrasWrflDnon_injured;
|
||||
class AinjPpneMstpSnonWrflDnon: AmovPpneMstpSrasWrflDnon_injured {
|
||||
canReload = 0;
|
||||
};
|
||||
|
||||
// mark as on ladder animation
|
||||
class LadderCivilStatic: StandBase {
|
||||
ACE_isLadder = 1;
|
||||
};
|
||||
|
||||
// dunno, important
|
||||
class AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1;
|
||||
class AcinPknlMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1 {
|
||||
enableDirectControl = 1;
|
||||
};
|
||||
class AcinPknlMwlkSnonWnonDb: AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1 {
|
||||
enableDirectControl = 1;
|
||||
};
|
||||
|
||||
// fix falling back to unconsciousness animation and disable rotating in that state
|
||||
class Unconscious: Default {
|
||||
ConnectTo[] = {};
|
||||
head = "headNo";
|
||||
forceAim = 1;
|
||||
static = 1;
|
||||
};
|
||||
|
||||
// idk. Flummi?
|
||||
class AinvPknlMstpSnonWnonDnon_medic0: HealBase {
|
||||
variantsPlayer[] = {};
|
||||
};
|
||||
};
|
||||
};
|
@ -33,7 +33,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\IconCheckPBO_ca.paa));
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
displayName = "Action";
|
||||
@ -87,6 +87,7 @@ class CfgVehicles {
|
||||
displayName = "LSD Vehicles";
|
||||
function = "ACE_Common_fnc_moduleLSDVehicles";
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
|
||||
isGlobal = 1;
|
||||
class Arguments {
|
||||
};
|
||||
|
@ -218,6 +218,7 @@ class CfgVoice {
|
||||
displayName = "$STR_ACE_Common_NoVoice";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgVoiceTypes {
|
||||
class ACE_NoVoice {
|
||||
name = "$STR_ACE_Common_NoVoice";
|
File diff suppressed because it is too large
Load Diff
@ -1,35 +0,0 @@
|
||||
|
||||
class CfgMovesBasic;
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class AgonyBase;
|
||||
class AgonyBaseRfl;
|
||||
class StandBase;
|
||||
|
||||
class States {
|
||||
class AinjPfalMstpSnonWnonDnon_carried_Down: AgonyBase {
|
||||
canReload = 0;
|
||||
};
|
||||
class AinjPfalMstpSnonWnonDnon_carried_Up: AgonyBase {
|
||||
canReload = 0;
|
||||
};
|
||||
class AinjPfalMstpSnonWrflDnon_carried_Down: AgonyBase {
|
||||
canReload = 0;
|
||||
};
|
||||
class AinjPfalMstpSnonWrflDnon_carried_Up: AgonyBaseRfl {
|
||||
canReload = 0;
|
||||
};
|
||||
|
||||
class AmovPpneMstpSnonWnonDnon_injured;
|
||||
class AinjPpneMstpSnonWnonDnon: AmovPpneMstpSnonWnonDnon_injured {
|
||||
canReload = 0;
|
||||
};
|
||||
class AmovPpneMstpSrasWrflDnon_injured;
|
||||
class AinjPpneMstpSnonWrflDnon: AmovPpneMstpSrasWrflDnon_injured {
|
||||
canReload = 0;
|
||||
};
|
||||
|
||||
class LadderCivilStatic: StandBase {
|
||||
ACE_isLadder = 1;
|
||||
};
|
||||
};
|
||||
};
|
Binary file not shown.
BIN
addons/common/UI/Icon_Module_CheckPBO_ca.paa
Normal file
BIN
addons/common/UI/Icon_Module_CheckPBO_ca.paa
Normal file
Binary file not shown.
BIN
addons/common/UI/Icon_Module_LSD_ca.paa
Normal file
BIN
addons/common/UI/Icon_Module_LSD_ca.paa
Normal file
Binary file not shown.
@ -33,6 +33,8 @@ if (hasInterface) then {
|
||||
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
|
||||
}] call FUNC(addEventhandler);
|
||||
|
||||
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
|
||||
|
||||
// hack to get PFH to work in briefing
|
||||
[QGVAR(onBriefingPFH), "onEachFrame", {
|
||||
if (time > 0) exitWith {
|
||||
@ -171,8 +173,6 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
|
||||
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(carriedBy),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
[QGVAR(carriedObj),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
|
||||
["VehicleSetFuel", {
|
||||
PARAMS_2(_vehicle,_fuelLevel);
|
||||
@ -183,3 +183,4 @@ _vehicle setFuel _fuelLevel;
|
||||
["displayTextPicture", FUNC(displayTextPicture)] call FUNC(addEventhandler);
|
||||
|
||||
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
|
||||
["isNotInside", {_this select 0 == _this select 1 || {vehicle (_this select 0) == _this select 0}}] call FUNC(addCanInteractWithCondition);
|
||||
|
@ -15,7 +15,6 @@ PREP(adminKick);
|
||||
PREP(ambientBrightness);
|
||||
PREP(applyForceWalkStatus);
|
||||
PREP(ASLToPosition);
|
||||
PREP(beingCarried);
|
||||
PREP(binarizeNumber);
|
||||
PREP(blurScreen);
|
||||
PREP(cachedCall);
|
||||
@ -23,8 +22,6 @@ PREP(canGetInPosition);
|
||||
PREP(canInteract);
|
||||
PREP(canInteractWith);
|
||||
PREP(canUseWeapon);
|
||||
PREP(carriedByObj);
|
||||
PREP(carryObj);
|
||||
PREP(changeProjectileDirection);
|
||||
PREP(checkPBOs);
|
||||
PREP(claim);
|
||||
@ -58,8 +55,6 @@ PREP(fixPosition);
|
||||
PREP(getAllDefinedSetVariables);
|
||||
PREP(getAllGear);
|
||||
PREP(getCaptivityStatus);
|
||||
PREP(getCarriedBy);
|
||||
PREP(getCarriedObj);
|
||||
PREP(getConfigCommander);
|
||||
PREP(getConfigGunner);
|
||||
PREP(getDeathAnim);
|
||||
@ -122,7 +117,6 @@ PREP(isModLoaded);
|
||||
PREP(isPlayer);
|
||||
PREP(isTurnedOut);
|
||||
PREP(letterToCode);
|
||||
PREP(limitMovementSpeed);
|
||||
PREP(loadPerson);
|
||||
PREP(loadPersonLocal);
|
||||
PREP(loadSettingsFromProfile);
|
||||
@ -160,7 +154,6 @@ PREP(serverLog);
|
||||
PREP(setArrestState);
|
||||
PREP(setCanInteract);
|
||||
PREP(setCaptivityStatus);
|
||||
PREP(setCarriedBy);
|
||||
PREP(setDefinedVariable);
|
||||
PREP(setDisableUserInputStatus);
|
||||
PREP(setForceWalkStatus);
|
||||
@ -258,6 +251,9 @@ if (hasInterface) then {
|
||||
}, 0, []] call cba_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
||||
// Init toHex
|
||||
[0] call FUNC(toHex);
|
||||
|
||||
ADDON = true;
|
||||
|
||||
isHC = !(hasInterface || isDedicated);
|
||||
|
@ -13,11 +13,16 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
|
||||
#include "CfgActions.hpp"
|
||||
#include "CfgMoves.hpp"
|
||||
#include "CfgVoice.hpp"
|
||||
|
||||
class ACE_Rsc_Display_Base {
|
||||
idd = -1;
|
||||
type = 0;
|
||||
@ -82,12 +87,12 @@ class ACE_Settings {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(enableNumberHotkeys) {
|
||||
/*class GVAR(enableNumberHotkeys) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
|
||||
};
|
||||
};*/
|
||||
class GVAR(settingFeedbackIcons) {
|
||||
value = 1;
|
||||
typeName = "SCALAR";
|
||||
@ -126,9 +131,6 @@ class ACE_Settings {
|
||||
#include <ProgressScreen.hpp>
|
||||
#include <HintConfig.hpp>
|
||||
#include <RscInfoType.hpp>
|
||||
#include <FixPickup.hpp>
|
||||
#include <FixAnimations.hpp>
|
||||
#include <NoVoice.hpp>
|
||||
|
||||
class CfgUIGrids {
|
||||
class IGUI {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Converts ASL to Arma "Position"
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
*
|
||||
* Add line to draw on debug
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Adds a new setting at runtime, with all it's metadata.
|
||||
* If has only local effects.
|
||||
*
|
||||
|
@ -1,12 +0,0 @@
|
||||
/**
|
||||
* fn_beingCarried.sqf
|
||||
* @Descr: Check if object is being carried
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [object OBJECT]
|
||||
* @Return: BOOL True if object is being carried
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
!(isNull ([_this select 0] call FUNC(getCarriedObj)));
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard and Jaynus
|
||||
* Author: esteldunedain and Jaynus
|
||||
* Returns the result of the function and caches it up to a given time or event
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -69,7 +69,7 @@ switch (_position) do {
|
||||
|
||||
case "gunner" : {
|
||||
private "_turretConfig";
|
||||
_turret = [typeOf _vehicle] call FUNC(getTurretGunner);
|
||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
@ -82,7 +82,7 @@ switch (_position) do {
|
||||
|
||||
case "commander" : {
|
||||
private "_turretConfig";
|
||||
_turret = [typeOf _vehicle] call FUNC(getTurretCommander);
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
@ -95,7 +95,7 @@ switch (_position) do {
|
||||
|
||||
case "copilot" : {
|
||||
private "_turretConfig";
|
||||
_turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
|
||||
_turret = [_vehicle] call FUNC(getTurretCopilot);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
@ -108,7 +108,7 @@ switch (_position) do {
|
||||
|
||||
case "turret" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
|
||||
_turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
@ -136,7 +136,7 @@ switch (_position) do {
|
||||
|
||||
case "ffv" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
|
||||
_turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
|
@ -1,13 +0,0 @@
|
||||
/**
|
||||
* fn_carriedByObj.sqf
|
||||
* @Descr: Check if object A is being carried by object B.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [object OBJECT, unit OBJECT]
|
||||
* @Return: BOOL True if B is carrying A.
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
([(_this select 0)] call FUNC(getCarriedBy) == [(_this select 1)] call FUNC(getCarriedBy));
|
@ -1,72 +0,0 @@
|
||||
/**
|
||||
* fn_carryObj.sqf
|
||||
* @Descr: Have a unit carry an object. Use ObjNull for second parameter if you want the unit to carry nothing
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT, objectToCarry OBJECT, attachToVector ARRAY (Optional)]
|
||||
* @Return: BOOL Returns true if succesful
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_to","_return", "_fallDown", "_carriedObj", "_positionUnit"];
|
||||
_unit = [_this, 0,ObjNull, [ObjNull]] call bis_fnc_param;
|
||||
_to = [_this, 1,ObjNull, [ObjNull]] call bis_fnc_param;
|
||||
_fallDown = false;
|
||||
if (count _this > 3) then {
|
||||
_fallDown = _this select 3;
|
||||
};
|
||||
_return = false;
|
||||
|
||||
[format["fnc_carryObj - UNIT: %1 ATTEMPTS TO CARRY %2",_unit,_to],2] call FUNC(debug);
|
||||
|
||||
if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj)))) || isNull _to) then {
|
||||
if (vehicle _unit != _unit) exitwith {};
|
||||
if (!isNull _to) then {
|
||||
if ((isNull ([_to] call FUNC(getCarriedObj))) && ([_unit] call FUNC(canInteract))) then {
|
||||
_return = true;
|
||||
_unit setvariable [QGVAR(carriedObj),_to,true];
|
||||
if (_fallDown) then {
|
||||
// [_unit,_fallDown] call FUNC(limitMovementSpeed);
|
||||
};
|
||||
[_to, _unit] call FUNC(setCarriedBy);
|
||||
if (count _this > 2) then {
|
||||
if (count (_this select 2) == 3) then {
|
||||
_to attachTo [_unit,(_this select 2)];
|
||||
[format["fnc_carryObj - UNIT: %1 TO %2 - attachTo offset: %3",_unit,_to,(_this select 2)],2] call FUNC(debug);
|
||||
};
|
||||
};
|
||||
["carryObject", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
// ["carryObject", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
};
|
||||
} else {
|
||||
if (!isNull ([_unit] call FUNC(getCarriedObj))) then {
|
||||
[format["fnc_carryObj - UNIT: %1 DROPING CARRIED OBJECT",_unit],2] call FUNC(debug);
|
||||
_carriedObj = ([_unit] call FUNC(getCarriedObj));
|
||||
|
||||
detach _carriedObj;
|
||||
//_carriedObj setPosATL [(getPosATL _carriedObj) select 0, (getPosATL _carriedObj) select 1,0];
|
||||
if (!surfaceIsWater getPos _unit) then {
|
||||
_positionUnit = getPosATL _carriedObj;
|
||||
_positionUnit set [2, ((getPosATL _unit) select 2) + 0.1];
|
||||
_carriedObj setPosATL _positionUnit;
|
||||
} else {
|
||||
_positionUnit = getPosASL _carriedObj;
|
||||
_positionUnit set [2, ((getPosASL _unit) select 2) + 0.1];
|
||||
_carriedObj setPosASL _positionUnit;
|
||||
};
|
||||
|
||||
[[_unit] call FUNC(getCarriedObj), objNull] call FUNC(setCarriedBy);
|
||||
_unit setvariable [QGVAR(carriedObj),_to,true];
|
||||
_return = true;
|
||||
|
||||
["carryObjectDropped", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
|
||||
// ["carryObjectDropped", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
|
||||
|
||||
};
|
||||
};
|
||||
} else {
|
||||
[format["fnc_carryObj - UNIT: %1 FAILED TO CARRY %2 - not an object or already carrying",_unit,_to],2] call FUNC(debug);
|
||||
};
|
||||
_return
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
*
|
||||
* Returns a orthonormal system of reference aligned with the supplied vector
|
||||
*
|
||||
|
@ -50,13 +50,13 @@ if (_state) then {
|
||||
};
|
||||
|
||||
_ctrl = _dlg displayctrl 103;
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", "while {!isNull (uiNamespace getVariable ['GVAR(dlgDisableMouse)', displayNull])} do {closeDialog 0}; failMission 'LOSER'; [false] call FUNC(disableUserInput);"];
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", QUOTE(while {!isNull (uiNamespace getVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),displayNull)])} do {closeDialog 0}; failMission 'LOSER'; [false] call DFUNC(disableUserInput);)];
|
||||
_ctrl ctrlEnable true;
|
||||
_ctrl ctrlSetText "ABORT";
|
||||
_ctrl ctrlSetTooltip "Abort.";
|
||||
|
||||
_ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer);
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", "closeDialog 0; player setDamage 1; [false] call FUNC(disableUserInput);"];
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", QUOTE(closeDialog 0; player setDamage 1; [false] call DFUNC(disableUserInput);)];
|
||||
_ctrl ctrlEnable (call {_config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}});
|
||||
_ctrl ctrlSetText "RESPAWN";
|
||||
_ctrl ctrlSetTooltip "Respawn.";
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Deletes a cached result
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
*
|
||||
* Executes a code on the next frame
|
||||
*
|
||||
|
@ -1,13 +0,0 @@
|
||||
/**
|
||||
* fn_getCarriedBy.sqf
|
||||
* @Descr: Get the object that is carrying given unit or object
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT]
|
||||
* @Return: OBJECT Returns the object that is carrying the unit. Otherwise returns ObjNull
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
((_this select 0) getvariable [QGVAR(carriedBy),objNull]);
|
@ -1,13 +0,0 @@
|
||||
/**
|
||||
* fn_getCarriedObj.sqf
|
||||
* @Descr: Grab the registered carried object
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT]
|
||||
* @Return: OBJECT Returns the object that the unit is currently carrying. If not carrying, returns ObjNull
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
((_this select 0) getvariable [QGVAR(carriedObj),objNull]);
|
@ -4,7 +4,7 @@
|
||||
* Get the commander config of a vehicles turret.
|
||||
*
|
||||
* Argument:
|
||||
* 0: vehicle type (String)
|
||||
* 0: vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Commander config (Config)
|
||||
@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
|
||||
[_config, _turret] call FUNC(getTurretConfigPath)
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Get the gunner config of a vehicles turret.
|
||||
*
|
||||
* Argument:
|
||||
* 0: vehicle type (String)
|
||||
* 0: vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Gunner config (Config)
|
||||
@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||
|
||||
[_config, _turret] call FUNC(getTurretConfigPath)
|
||||
|
@ -4,23 +4,23 @@
|
||||
* Gets the turret index of door gunners
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle type (String)
|
||||
* 0: Vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Turret indexes of the door gunner. Empty array means no gunner position. (Array)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicleType", "_turrets", "_doorTurrets", "_config"];
|
||||
private ["_vehicle", "_turrets", "_doorTurrets", "_config"];
|
||||
|
||||
_vehicleType = _this select 0;
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_turrets = [_vehicleType] call FUNC(getTurrets);
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
_doorTurrets = [];
|
||||
|
||||
{
|
||||
_config = configFile >> "CfgVehicles" >> _vehicleType;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {
|
||||
|
@ -64,7 +64,7 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "gunner" : {
|
||||
_turret = [typeOf _vehicle] call FUNC(getTurretGunner);
|
||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||
|
||||
if (CANGETINTURRETINDEX) then {
|
||||
_script = [
|
||||
@ -75,7 +75,7 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "commander" : {
|
||||
_turret = [typeOf _vehicle] call FUNC(getTurretCommander);
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
|
||||
if (CANGETINTURRETINDEX) then {
|
||||
_script = [
|
||||
@ -86,7 +86,7 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "copilot" : {
|
||||
_turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
|
||||
_turret = [_vehicle] call FUNC(getTurretCopilot);
|
||||
|
||||
if (CANGETINTURRETINDEX) then {
|
||||
_script = [
|
||||
@ -100,7 +100,7 @@ switch (_position) do {
|
||||
|
||||
case "turret" : {
|
||||
private "_turrets";
|
||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
|
||||
_turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
|
||||
_script = [
|
||||
@ -127,7 +127,7 @@ switch (_position) do {
|
||||
|
||||
case "ffv" : {
|
||||
private "_turrets";
|
||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
|
||||
_turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
|
||||
_script = [
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Returns the metadata of a setting if it exists
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Get the turret index of a vehicles commander.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle type (String)
|
||||
* 0: Vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Turret index of the vehicles commander. Empty array means no observer position. (Array)
|
||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
_turret = [];
|
||||
{
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Get the turret index of a vehicles copilot.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle type (String)
|
||||
* 0: Vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Turret index of the vehicles gunner. Empty array means no copilot position. (Array)
|
||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
_turret = [];
|
||||
{
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Get the turret index of a vehicles gunner.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle type (String)
|
||||
* 0: Vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Turret index of the vehicles gunner. Empty array means no gunner position. (Array)
|
||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
_turret = [];
|
||||
{
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
|
@ -18,7 +18,6 @@ _vehicle = vehicle _unit;
|
||||
|
||||
if (_unit == _vehicle) exitWith {[]};
|
||||
|
||||
//_turrets = [typeOf _vehicle] call FUNC(getTurrets);
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
_units = [];
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Get the turret indices of ffv turrets.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle type (String)
|
||||
* 0: Vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Turret index of the vehicles gunner. Empty array means no ffv turrets. (Array)
|
||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
_turret = [];
|
||||
{
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Get the turret indices of other turrets (not gunner, commander, copilot or ffv).
|
||||
*
|
||||
* Argument:
|
||||
* 0: Vehicle type (String)
|
||||
* 0: Vehicle (Object)
|
||||
*
|
||||
* Return value:
|
||||
* Turret index of the vehicles gunner. Empty array means no other turrets. (Array)
|
||||
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_turrets = [_vehicle] call FUNC(getTurrets);
|
||||
_turrets = allTurrets [_vehicle, true];
|
||||
|
||||
_turret = [];
|
||||
{
|
||||
_config = configFile >> "CfgVehicles" >> _vehicle;
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
_config = [_config, _x] call FUNC(getTurretConfigPath);
|
||||
|
||||
|
@ -19,7 +19,7 @@ _vector2 = _this select 1;
|
||||
_newVector = [];
|
||||
|
||||
for "_i" from 0 to (((count _vector1) min (count _vector2)) - 1) do {
|
||||
_newVector = _newVector + [(_vector1 select _i) * (_vector2 select _i)];
|
||||
_newVector pushBack ((_vector1 select _i) * (_vector2 select _i));
|
||||
};
|
||||
|
||||
_newVector
|
||||
|
@ -1,53 +0,0 @@
|
||||
/**
|
||||
* fn_limitMovementSpeed.sqf
|
||||
* @Descr: Limits the movement speed of a unit
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unit OBJECT, fallDown BOOL (Optional)]
|
||||
* @Return: void
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_carriedObj"];
|
||||
_unit = _this select 0;
|
||||
_fallDown = false;
|
||||
if (count _this > 1) then {
|
||||
_fallDown = _this select 1;
|
||||
};
|
||||
|
||||
if ((_unit getvariable [QGVAR(limitMovementSpeed),false])) exitwith {
|
||||
_unit setvariable [QGVAR(limitMovementSpeed),nil,true];
|
||||
};
|
||||
|
||||
[{
|
||||
private["_unit","_fallDown","_carriedObj"];
|
||||
_unit = (_this select 0) select 0;
|
||||
_fallDown = (_this select 0) select 1;
|
||||
|
||||
_carriedObj = [_unit] call FUNC(getCarriedObj);
|
||||
|
||||
if !(_unit getvariable [QGVAR(limitMovementSpeed),false]) exitwith {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
if !((!isNull _carriedObj) && (alive _unit)) exitwith {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (speed _unit > 12 && vehicle _unit == _unit && isTouchingGround _unit) then {
|
||||
|
||||
_unit setVelocity [0,0,0];
|
||||
|
||||
if (_fallDown) then {
|
||||
_unit playMove "amovppnemstpsraswrfldnon";
|
||||
};
|
||||
|
||||
if (_carriedObj isKindOf "Man") then {
|
||||
hint "You can not move this fast while transporting this person.";
|
||||
} else {
|
||||
hint "You can not move this fast while carrying this object";
|
||||
};
|
||||
[_unit,ObjNull] call FUNC(carryObj);
|
||||
};
|
||||
}, 0.5, [_unit,_fallDown] ] call CBA_fnc_addPerFrameHandler;
|
@ -35,8 +35,6 @@ if (_unit distance _loadcar <= 10) then {
|
||||
};
|
||||
if (!isNull _vehicle) then {
|
||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||
[_caller,objNull] call FUNC(carryObj);
|
||||
[_unit,objNull] call FUNC(carryObj);
|
||||
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
_vehicle
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Load the user setable settings from the user profile.
|
||||
* Config < Server UserConfig < Mission Config < Client settings
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Load the parameters on the server.
|
||||
* Config < Server UserConfig < Mission Config
|
||||
*
|
||||
|
@ -1,15 +1,4 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_array", "_index"];
|
||||
|
||||
_array = [];
|
||||
|
||||
for "_index" from 0 to 10000 do {
|
||||
if (str (findDisplay _this displayCtrl _index) != "No control") then {
|
||||
diag_log text str (findDisplay _this displayCtrl _index);
|
||||
_array pushBack _index;
|
||||
};
|
||||
};
|
||||
|
||||
_array;
|
||||
[allControls findDisplay _this, {ctrlIDC _this}] call FUNC(map)
|
||||
|
@ -1,15 +1,4 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_array", "_index"];
|
||||
|
||||
_array = [];
|
||||
|
||||
for "_index" from 0 to 10000 do {
|
||||
if (str (findDisplay _index) != "No Display") then {
|
||||
diag_log text str findDisplay _index;
|
||||
_array pushBack _index;
|
||||
};
|
||||
};
|
||||
|
||||
_array;
|
||||
[allDisplays, {ctrlIDD _this}] call FUNC(map)
|
||||
|
@ -12,33 +12,29 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_number", "_minLength", "_length", "_digits", "_index", "_count"];
|
||||
private ["_number", "_minLength", "_length", "_digits"];
|
||||
|
||||
_number = _this select 0;
|
||||
_minLength = _this select 1;
|
||||
|
||||
_number = _number min 999999;
|
||||
_length = floor (log _number + 1);
|
||||
|
||||
if !(isNil "_minLength") then {_length = (_length max _minLength) min 6};
|
||||
_number = str _number;
|
||||
|
||||
_length = count _number;
|
||||
|
||||
if (isNil "_minLength") then {_minLength = _length};
|
||||
|
||||
_minLength = _minLength min 6;
|
||||
|
||||
while {_length < _minLength} do {
|
||||
_number = "0" + _number;
|
||||
_length = _length + 1;
|
||||
};
|
||||
|
||||
_digits = [];
|
||||
|
||||
if (_number < 1) exitWith {
|
||||
for "_index" from 0 to (_length - 1) do {
|
||||
_digits set [_index, 0];
|
||||
};
|
||||
_digits
|
||||
for "_x" from 0 to (_length - 1) do {
|
||||
_digits pushBack parseNumber (_number select [_x, 1]);
|
||||
};
|
||||
|
||||
while {
|
||||
_count = count _digits;
|
||||
_count < _length
|
||||
} do {
|
||||
_digit = floor (_number / (10 ^ (_length - _count - 1)));
|
||||
{
|
||||
_digit = _digit - _x * (10 ^ (_count - _forEachIndex));
|
||||
} forEach _digits;
|
||||
_digits set [_count, _digit];
|
||||
};
|
||||
_digits
|
||||
|
@ -12,14 +12,24 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_digits", "_count", "_string", "_index"];
|
||||
private ["_number", "_minLength", "_length"];
|
||||
|
||||
_digits = _this call FUNC(numberToDigits);
|
||||
_number = _this select 0;
|
||||
_minLength = _this select 1;
|
||||
|
||||
_count = count _digits;
|
||||
_number = _number min 999999;
|
||||
|
||||
_string = "";
|
||||
for "_index" from 0 to (_count - 1) do {
|
||||
_string = _string + str (_digits select _index);
|
||||
_number = str _number;
|
||||
|
||||
_length = count _number;
|
||||
|
||||
if (isNil "_minLength") then {_minLength = _length};
|
||||
|
||||
_minLength = _minLength min 6;
|
||||
|
||||
while {_length < _minLength} do {
|
||||
_number = "0" + _number;
|
||||
_length = _length + 1;
|
||||
};
|
||||
_string
|
||||
|
||||
_number
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Converts Arma "Position" to ASL
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
*
|
||||
* Reads a setting value from a module, set it and force it. Logs if the setting is missing from the module.
|
||||
* Must be called on the server, effect is global.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Removes a magazine from the unit that has an specific ammo count
|
||||
*
|
||||
* Argument:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard, based on Killzone-Kid code
|
||||
* Author: esteldunedain, based on Killzone-Kid code
|
||||
*
|
||||
* Removes quotation marks to avoid exploits and optionally html tags from text to avoid conflicts with structured text.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// by CAA-Picard
|
||||
// by esteldunedain
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isServer) then {
|
||||
|
@ -1,21 +0,0 @@
|
||||
/**
|
||||
* fn_setCarriedBy.sqf
|
||||
* @Descr: Registers an object being carried by another object
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: [unitToBeCarried OBJECT, objectCarrying OBJECT]
|
||||
* @Return: BOOL True if succesfully registered
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_to","_return"];
|
||||
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
_to = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
|
||||
_return = false;
|
||||
if ((isNull ([_unit] call FUNC(getCarriedBy))) || isNull _to) then {
|
||||
_return = true;
|
||||
_unit setvariable [QGVAR(carriedBy),_to,true];
|
||||
};
|
||||
_return
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
*
|
||||
* Sets the value of an ACE_Parameter and makes it public.
|
||||
*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Change the value of an existing setting if it was not previously forced. Force if neccesary.
|
||||
* If executed on clients it has local effect.
|
||||
* If executed on server it can have global effect if the last parameter is set to true.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Load a setting from config if it was not previosuly forced. Force if neccesary.
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
* Schedules the publishment of an object variable to reduce network overhead
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,47 +1,48 @@
|
||||
/*
|
||||
Author: commy2
|
||||
Author: commy2, esteldunedain
|
||||
|
||||
Description:
|
||||
Converts number to hexadecimal number
|
||||
|
||||
Arguments:
|
||||
A number
|
||||
A number between 0 and 255 <NUMBER>
|
||||
|
||||
Return Value:
|
||||
A hexadecimal number, String
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_number", "_minLength", "_sign", "_hex", "_rest"];
|
||||
private ["_number"];
|
||||
_number = ((round abs (_this select 0)) max 0) min 255;
|
||||
|
||||
_number = _this select 0;
|
||||
_minLength = _this select 1;
|
||||
if (isNil QGVAR(hexArray)) then {
|
||||
private ["_minLength", "_i", "_num", "_hex", "_rest"];
|
||||
|
||||
if (isNil "_minLength") then {_minLength = 1};
|
||||
GVAR(hexArray) = [];
|
||||
_minLength = 2;
|
||||
for [{_i = 0;}, {_i < 256}, {_i = _i + 1}] do {
|
||||
_num = _i;
|
||||
_hex = ["", "0"] select (_i == 0);
|
||||
|
||||
_sign = ["", "-"] select (_number < 0);
|
||||
|
||||
_number = round abs _number;
|
||||
_hex = ["", "0"] select (_number == 0);
|
||||
|
||||
while {_number > 0} do {
|
||||
_rest = _number mod 16;
|
||||
_rest = switch _rest do {
|
||||
case 10 : {"A"};
|
||||
case 11 : {"B"};
|
||||
case 12 : {"C"};
|
||||
case 13 : {"D"};
|
||||
case 14 : {"E"};
|
||||
case 15 : {"F"};
|
||||
default {str _rest};
|
||||
};
|
||||
_number = floor (_number / 16);
|
||||
|
||||
_hex = _rest + _hex;
|
||||
while {_num > 0} do {
|
||||
_rest = _num mod 16;
|
||||
_rest = switch _rest do {
|
||||
case 10 : {"A"};
|
||||
case 11 : {"B"};
|
||||
case 12 : {"C"};
|
||||
case 13 : {"D"};
|
||||
case 14 : {"E"};
|
||||
case 15 : {"F"};
|
||||
default {str _rest};
|
||||
};
|
||||
_num = floor (_num / 16);
|
||||
_hex = _rest + _hex;
|
||||
};
|
||||
while {count toArray _hex < _minLength} do {
|
||||
_hex = "0" + _hex;
|
||||
};
|
||||
GVAR(hexArray) pushBack _hex;
|
||||
};
|
||||
};
|
||||
|
||||
while {count toArray _hex < _minLength} do {
|
||||
_hex = "0" + _hex;
|
||||
};
|
||||
|
||||
_sign + _hex
|
||||
(GVAR(hexArray) select _number)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Author: esteldunedain
|
||||
*
|
||||
* Executes a code once with a given game time delay, using a PFH
|
||||
*
|
||||
|
@ -13,6 +13,11 @@ class Extended_PostInit_EventHandlers {
|
||||
};
|
||||
|
||||
class Extended_Init_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initPerson));
|
||||
};
|
||||
};
|
||||
class StaticWeapon {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject));
|
||||
|
@ -16,4 +16,10 @@ if (isNil "ACE_maxWeightCarry") then {
|
||||
|
||||
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
|
||||
["playerChanged", {_this call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||
["playerVehicleChanged", {[ACE_player, objNull] call DFUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||
["playerWeaponChanged", {_this call DFUNC(handlePlayerWeaponChanged)}] call EFUNC(common,addEventhandler);
|
||||
|
||||
// handle waking up dragged unit and falling unconscious while dragging
|
||||
["medical_onUnconscious", {_this call DFUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
|
||||
|
||||
//@todo Captivity?
|
||||
|
@ -18,10 +18,14 @@ PREP(handleKilled);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handlePlayerWeaponChanged);
|
||||
PREP(handleScrollWheel);
|
||||
PREP(handleUnconscious);
|
||||
PREP(initObject);
|
||||
PREP(initPerson);
|
||||
PREP(isObjectOnObject);
|
||||
PREP(setCarryable);
|
||||
PREP(setDraggable);
|
||||
PREP(startCarry);
|
||||
PREP(startCarryPFH);
|
||||
PREP(startDrag);
|
||||
PREP(startDragPFH);
|
||||
|
||||
|
@ -22,4 +22,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// a static weapon has to be empty for dragging
|
||||
if ((typeOf _target) isKindOf "StaticWeapon" && {count crew _target > 0}) exitWith {false};
|
||||
|
||||
alive _target && {_target getVariable [QGVAR(canCarry), false]}
|
||||
alive _target && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"]}
|
||||
|
@ -22,4 +22,4 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// a static weapon has to be empty for dragging
|
||||
if ((typeOf _target) isKindOf "StaticWeapon" && {count crew _target > 0}) exitWith {false};
|
||||
|
||||
alive _target && {_target getVariable [QGVAR(canDrag), false]}
|
||||
alive _target && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"]}
|
||||
|
@ -17,37 +17,34 @@ private ["_unit", "_target"];
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
|
||||
// check weight
|
||||
private "_weight";
|
||||
_weight = [_target] call FUNC(getWeight);
|
||||
|
||||
if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith {
|
||||
[localize "STR_ACE_Dragging_UnableToDrag"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
// select no weapon and stop sprinting
|
||||
_unit action ["SwitchWeapon", _unit, _unit, 99];
|
||||
|
||||
[_unit, "isDragging", true] call EFUNC(common,setforceWalkStatus);
|
||||
|
||||
// prevent multiple players from accessing the same object
|
||||
[_unit, _target, true] call EFUNC(common,claim);
|
||||
|
||||
// get attachTo offset and direction.
|
||||
private ["_position", "_direction"];
|
||||
|
||||
_position = _target getVariable [QGVAR(carryPosition), [0, 0, 0]];
|
||||
_direction = _target getVariable [QGVAR(carryDirection), 0];
|
||||
|
||||
// add height offset of model
|
||||
private "_offset";
|
||||
_offset = (_target modelToWorld [0, 0, 0] select 2) - (_unit modelToWorld [0, 0, 0] select 2);
|
||||
// handle objects vs persons
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
|
||||
_position = _position vectorAdd [0, 0, _offset];
|
||||
[_unit, "AcinPercMstpSnonWnonDnon", 2, true] call EFUNC(common,doAnimation);
|
||||
[_target, "AinjPfalMstpSnonWnonDf_carried_dead", 2, true] call EFUNC(common,doAnimation);
|
||||
|
||||
// attach object
|
||||
_target attachTo [_unit, _position];
|
||||
_target setDir _direction;
|
||||
// attach person
|
||||
_target attachTo [_unit, _position, "LeftShoulder"];
|
||||
|
||||
} else {
|
||||
|
||||
// add height offset of model
|
||||
private "_offset";
|
||||
_offset = (_target modelToWorld [0, 0, 0] select 2) - (_unit modelToWorld [0, 0, 0] select 2);
|
||||
|
||||
_position = _position vectorAdd [0, 0, _offset];
|
||||
|
||||
// attach object
|
||||
_target attachTo [_unit, _position];
|
||||
|
||||
};
|
||||
["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
|
||||
|
||||
_unit setVariable [QGVAR(isCarrying), true, true];
|
||||
_unit setVariable [QGVAR(carriedObject), _target, true];
|
||||
@ -74,7 +71,7 @@ _actionID = _unit addAction [
|
||||
_unit setVariable [QGVAR(ReleaseActionID), _actionID];
|
||||
|
||||
// check everything
|
||||
[FUNC(carryObjectPFH), 0, [_unit, _target]] call CBA_fnc_addPerFrameHandler;
|
||||
[FUNC(carryObjectPFH), 0.5, [_unit, _target]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// reset current dragging height.
|
||||
GVAR(currentHeightChange) = 0;
|
||||
|
@ -1,11 +1,19 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DRAGGING
|
||||
systemChat format ["%1 carryObjectPFH running", time];
|
||||
#endif
|
||||
|
||||
private ["_unit", "_target"];
|
||||
|
||||
_unit = _this select 0 select 0;
|
||||
_target = _this select 0 select 1;
|
||||
|
||||
if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// drop if the crate is destroyed
|
||||
if !([_target] call EFUNC(common,isAlive)) then {
|
||||
[_unit, _target] call FUNC(dropObject_carry);
|
||||
|
@ -31,7 +31,11 @@ _position = _position vectorAdd [0, 0, _offset];
|
||||
|
||||
// attach object
|
||||
_target attachTo [_unit, _position];
|
||||
_target setDir _direction;
|
||||
["setDir", _target, [_target, _direction]] call EFUNC(common,targetEvent);
|
||||
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
[_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
_unit setVariable [QGVAR(isDragging), true, true];
|
||||
_unit setVariable [QGVAR(draggedObject), _target, true];
|
||||
@ -58,7 +62,7 @@ _actionID = _unit addAction [
|
||||
_unit setVariable [QGVAR(ReleaseActionID), _actionID];
|
||||
|
||||
// check everything
|
||||
[FUNC(dragObjectPFH), 0, [_unit, _target]] call CBA_fnc_addPerFrameHandler;
|
||||
[FUNC(dragObjectPFH), 0.5, [_unit, _target]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// reset current dragging height.
|
||||
GVAR(currentHeightChange) = 0;
|
||||
|
@ -1,11 +1,19 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DRAGGING
|
||||
systemChat format ["%1 dragObjectPFH running", time];
|
||||
#endif
|
||||
|
||||
private ["_unit", "_target"];
|
||||
|
||||
_unit = _this select 0 select 0;
|
||||
_target = _this select 0 select 1;
|
||||
|
||||
if !(_unit getVariable [QGVAR(isDragging), false]) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
// drop if the crate is destroyed
|
||||
if !([_target] call EFUNC(common,isAlive)) then {
|
||||
[_unit, _target] call FUNC(dropObject);
|
||||
|
@ -27,12 +27,20 @@ _inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||
_unit playAction "released";
|
||||
|
||||
// prevent collision damage
|
||||
["fixCollision", _unit, _unit] call EFUNC(common,targetEvent);
|
||||
["fixCollision", _unit] call EFUNC(common,localEvent);
|
||||
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
|
||||
|
||||
// release object
|
||||
detach _target;
|
||||
|
||||
if (_target isKindOf "CAManBase") then {
|
||||
if (_target getVariable ["ACE_isUnconscious", false]) then {
|
||||
[_target, "unconscious", 2, true] call EFUNC(common,doAnimation);
|
||||
} else {
|
||||
[_target, "", 2, true] call EFUNC(common,doAnimation); //@todo "AinjPpneMrunSnonWnonDb_release" seems to fall back to unconsciousness anim.
|
||||
};
|
||||
};
|
||||
|
||||
_unit removeWeapon "ACE_FakePrimaryWeapon";
|
||||
|
||||
// prevent object from flipping inside buildings
|
||||
@ -46,5 +54,7 @@ _unit setVariable [QGVAR(draggedObject), objNull, true];
|
||||
// make object accesable for other units
|
||||
[objNull, _target, true] call EFUNC(common,claim);
|
||||
|
||||
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
||||
if !(_target isKindOf "CAManBase") then {
|
||||
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
@ -24,12 +24,28 @@ private "_inBuilding";
|
||||
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||
|
||||
// prevent collision damage
|
||||
["fixCollision", _unit, _unit] call EFUNC(common,targetEvent);
|
||||
["fixCollision", _unit] call EFUNC(common,localEvent);
|
||||
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
|
||||
|
||||
// release object
|
||||
detach _target;
|
||||
|
||||
// fix anim when aborting carrying persons
|
||||
if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then {
|
||||
if (vehicle _unit == _unit) then {
|
||||
[_unit, "", 2, true] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
if (_target getVariable ["ACE_isUnconscious", false]) then {
|
||||
[_target, "unconscious", 2, true] call EFUNC(common,doAnimation);
|
||||
} else {
|
||||
[_target, "", 2, true] call EFUNC(common,doAnimation); //@todo
|
||||
};
|
||||
};
|
||||
|
||||
// properly remove fake weapon
|
||||
_unit removeWeapon "ACE_FakePrimaryWeapon";
|
||||
|
||||
// reselect weapon and re-enable sprint
|
||||
_unit selectWeapon primaryWeapon _unit;
|
||||
|
||||
@ -46,5 +62,7 @@ _unit setVariable [QGVAR(carriedObject), objNull, true];
|
||||
// make object accesable for other units
|
||||
[objNull, _target, true] call EFUNC(common,claim);
|
||||
|
||||
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
||||
if !(_target isKindOf "CAManBase") then {
|
||||
["fixPosition", _target, _target] call EFUNC(common,targetEvent);
|
||||
["fixFloating", _target, _target] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
@ -13,7 +13,9 @@ if (_unit getVariable [QGVAR(isDragging), false]) then {
|
||||
private "_draggedObject";
|
||||
_draggedObject = _unit getVariable [QGVAR(draggedObject), objNull];
|
||||
|
||||
[_unit, _draggedObject] call FUNC(dropObject);
|
||||
if (!isNull _draggedObject) then {
|
||||
[_unit, _draggedObject] call FUNC(dropObject);
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
@ -25,7 +27,9 @@ if (_unit getVariable [QGVAR(isCarrying), false]) then {
|
||||
private "_carriedObject";
|
||||
_carriedObject = _unit getVariable [QGVAR(carriedObject), objNull];
|
||||
|
||||
[_unit, _carriedObject] call FUNC(dropObject_carry);
|
||||
if (!isNull _carriedObject) then {
|
||||
[_unit, _carriedObject] call FUNC(dropObject_carry);
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -20,12 +20,21 @@ if (_unit getVariable [QGVAR(isDragging), false]) then {
|
||||
|
||||
if (_unit getVariable [QGVAR(isCarrying), false]) then {
|
||||
|
||||
// drop carried object when selecting any weapon
|
||||
if (_weapon != "") then {
|
||||
private "_carriedObject";
|
||||
_carriedObject = _unit getVariable [QGVAR(carriedObject), objNull];
|
||||
private "_carriedObject";
|
||||
_carriedObject = _unit getVariable [QGVAR(carriedObject), objNull];
|
||||
|
||||
if (_carriedObject isKindOf "CAManBase") then {
|
||||
|
||||
if (_weapon != primaryWeapon _unit) then {
|
||||
[_unit, _carriedObject] call FUNC(dropObject_carry);
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
// drop carried object when selecting any weapon
|
||||
if (_weapon != "") then {
|
||||
[_unit, _carriedObject] call FUNC(dropObject_carry);
|
||||
};
|
||||
|
||||
[_unit, _carriedObject] call FUNC(dropObject_carry);
|
||||
};
|
||||
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user