diff --git a/CHANGELOG.md b/CHANGELOG.md index 64a072d..9c57c2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 2026-07-19 + +### Aeronaves + +- As versões navais MB do Caracal agora contam com EFS (Emergency Floating System), incluindo acionamento, desacionamento e deploy das boias de emergência para pouso na água. +- As versões FAB do Caracal (Fast Rope, SAR e Transport) também passaram a contar com EFS para operações de pouso na água. +- Corrigida a flutuação nativa do Caracal: a named property `autocenter=0` foi removida do Geometry LOD, permitindo que o volume de buoyancy seja reconhecido corretamente pelo Arma 3. +- As versões SAR e Offshore do Pantera também foram integradas ao EFS, com acionamento e deploy das boias de emergência para operações de pouso na água. + +### Resgate SAR + +- Os scripts de EFS e do guincho SAR foram convertidos em funções registradas (`BRAF_fnc_efs` e `BRAF_fnc_hoist`), preservando as ações e transições de estado do Fennec, Pantera e Caracal. + ## 2026-07-13 ### Aeronaves diff --git a/braf_air/Braf_Helicopters/Braf_Caracal/Braf_Caracal.p3d b/braf_air/Braf_Helicopters/Braf_Caracal/Braf_Caracal.p3d index d79c038..a42317e 100644 --- a/braf_air/Braf_Helicopters/Braf_Caracal/Braf_Caracal.p3d +++ b/braf_air/Braf_Helicopters/Braf_Caracal/Braf_Caracal.p3d @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:affd93796ef19507b15e1fb33d599f4e9a825a069d675f1a2992587cc5e642ef -size 220076224 +oid sha256:bb3282e24954981d57cb742d5b2f2254a5d11dd41a5074f86fff832271529a70 +size 224074929 diff --git a/braf_air/Braf_Helicopters/Braf_Caracal/Caracal_Base.hpp b/braf_air/Braf_Helicopters/Braf_Caracal/Caracal_Base.hpp index 5cc1c5b..ed52e50 100644 --- a/braf_air/Braf_Helicopters/Braf_Caracal/Caracal_Base.hpp +++ b/braf_air/Braf_Helicopters/Braf_Caracal/Caracal_Base.hpp @@ -317,13 +317,13 @@ class BRAF_Caracal_Base: Helicopter_Base_H { source="user"; animPeriod=0; - initPhase=1; + initPhase=0; }; class EFS_Hide { source="user"; animPeriod=0; - initPhase=1; + initPhase=0; }; class Hoist_Hide { @@ -1027,8 +1027,8 @@ class BRAF_Caracal_FFV: BRAF_Caracal_Base { animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",1, + "EFS_Hide",0, + "EFS_Cover_Hide",0, "Door_L_1",1, "Door_L_2",1, "Door_R_1",1, @@ -1215,8 +1215,8 @@ class BRAF_Caracal_2: BRAF_Caracal_Base editorPreview="\braf\braf_insignia\editorpreview\Air\BRAF_Caracal_2.jpg"; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",1, + "EFS_Hide",0, + "EFS_Cover_Hide",0, "SAR_Hide",0, "Pole_Hide",1, "Hoist_Hide",1, @@ -1235,43 +1235,43 @@ class BRAF_Caracal_2: BRAF_Caracal_Base priority=1; onlyForPlayer=0; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND !(""BRAF_Rescue_Seat"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="[this, ""deploy"", ""BRAF_Rescue_Seat""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="[this, ""deploy"", ""BRAF_Rescue_Seat""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Deploy_Rescue_Basket: Deploy_Rescue_Seat { displayname=" Deploy Rescue Basket "; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND !(""BRAF_Rescue_Basket"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="[this, ""deploy"", ""BRAF_Rescue_Basket""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="[this, ""deploy"", ""BRAF_Rescue_Basket""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Deploy_Rescue_Stretcher: Deploy_Rescue_Seat { displayname=" Deploy Rescue Stretcher "; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND !(""BRAF_Rescue_Stretcher"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="[this, ""deploy"", ""BRAF_Rescue_Stretcher""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="[this, ""deploy"", ""BRAF_Rescue_Stretcher""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Hoist_Down: Deploy_Rescue_Seat { displayname=" Extend Cable Hook "; condition="this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9"; - statement="[this, ""down""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; + statement="[this, ""down""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; }; class Hoist_Up: Deploy_Rescue_Seat { displayname=" Recover Cable Hook "; condition="this animationphase 'Hoist_Hide' < -0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9"; - statement="[this, ""up""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; + statement="[this, ""up""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; }; class Recover_Rescue_Seat: Deploy_Rescue_Seat { displayname=" Retrieve Rescue Payload "; condition="(player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6"; - statement="[this, ""recover""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',1]"; + statement="[this, ""recover""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',1]"; }; class Hoist_Cut: Deploy_Rescue_Seat { displayname=" Cut Hoist Hook Cable "; condition="(player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Hoist_Hide' < 0"; - statement="[this, ""cut""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',1]"; + statement="[this, ""cut""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',1]"; }; class Open_Door_Left { @@ -1613,8 +1613,8 @@ class BRAF_Caracal_3: BRAF_Caracal_Base }; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",1, + "EFS_Hide",0, + "EFS_Cover_Hide",0, "SAR_Hide",1, "Pole_Hide",1, "Hoist_Hide",0, @@ -1628,6 +1628,43 @@ class BRAF_Caracal_4: BRAF_Caracal_1 author="BRAF TEAM"; _generalMacro="BRAF_Caracal_4"; displayName="UH-15 Super Cougar (Fast Rope)"; + canFloat=1; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; + }; + class UserActions: UserActions + { + class Arm_EFS + { + displayname=" Arm EFS "; + position="window_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; + }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; editorPreview="\braf\braf_insignia\editorpreview\air\BRAF_Caracal_4.jpg"; faction="BRAF_NAVY"; crew="braf_characters_aviation_navy_pilot"; @@ -1648,8 +1685,8 @@ class BRAF_Caracal_4: BRAF_Caracal_1 }; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",0, + "EFS_Hide",0, + "EFS_Cover_Hide",1, "Door_L_1",1, "Door_L_2",1, "Door_R_1",1, @@ -1670,10 +1707,47 @@ class BRAF_Caracal_5: BRAF_Caracal_2 editorPreview="\braf\braf_insignia\editorpreview\air\BRAF_Caracal_5.jpg"; faction="BRAF_NAVY"; crew="braf_characters_aviation_navy_pilot"; + canFloat=1; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; + }; + class UserActions: UserActions + { + class Arm_EFS + { + displayname=" Arm EFS "; + position="window_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; + }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",0, + "EFS_Hide",0, + "EFS_Cover_Hide",1, "SAR_Hide",0, "Pole_Hide",1, "Hoist_Hide",1, @@ -1705,10 +1779,47 @@ class BRAF_Caracal_6: BRAF_Caracal_3 editorPreview="\braf\braf_insignia\editorpreview\air\BRAF_Caracal_6.jpg"; faction="BRAF_NAVY"; crew="braf_characters_aviation_navy_pilot"; + canFloat=1; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; + }; + class UserActions: UserActions + { + class Arm_EFS + { + displayname=" Arm EFS "; + position="window_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; + }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",0, + "EFS_Hide",0, + "EFS_Cover_Hide",1, "SAR_Hide",1, "Pole_Hide",1, "Hoist_Hide",0, @@ -1762,10 +1873,47 @@ class BRAF_Caracal_7: BRAF_Caracal_1 editorPreview="\braf\braf_insignia\editorpreview\air\BRAF_Caracal_7.jpg"; faction="BRAF_FAB"; crew="braf_characters_aviation_air_force_pilot"; + canFloat=1; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; + }; + class UserActions: UserActions + { + class Arm_EFS + { + displayname=" Arm EFS "; + position="window_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; + }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",0, + "EFS_Hide",0, + "EFS_Cover_Hide",1, "Door_L_1",1, "Door_L_2",1, "Door_R_1",1, @@ -1802,6 +1950,43 @@ class BRAF_Caracal_8: BRAF_Caracal_2 editorPreview="\braf\braf_insignia\editorpreview\air\BRAF_Caracal_8.jpg"; faction="BRAF_FAB"; crew="braf_characters_aviation_air_force_pilot"; + canFloat=1; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; + }; + class UserActions: UserActions + { + class Arm_EFS + { + displayname=" Arm EFS "; + position="window_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; + }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; hiddenSelectionsTextures[]= { "braf\braf_air\BRAF_helicopters\BRAF_Caracal\data\FAB\Camo1_co.paa", @@ -1820,8 +2005,8 @@ class BRAF_Caracal_8: BRAF_Caracal_2 }; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",0, + "EFS_Hide",0, + "EFS_Cover_Hide",1, "SAR_Hide",0, "Pole_Hide",1, "Hoist_Hide",1, @@ -1838,6 +2023,43 @@ class BRAF_Caracal_9: BRAF_Caracal_3 editorPreview="\braf\braf_insignia\editorpreview\air\BRAF_Caracal_9.jpg"; faction="BRAF_FAB"; crew="braf_characters_aviation_air_force_pilot"; + canFloat=1; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; + }; + class UserActions: UserActions + { + class Arm_EFS + { + displayname=" Arm EFS "; + position="window_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; + }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','ARMED']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; hiddenSelectionsTextures[]= { "braf\braf_air\BRAF_helicopters\BRAF_Caracal\data\FAB\Camo1_co.paa", @@ -1856,8 +2078,8 @@ class BRAF_Caracal_9: BRAF_Caracal_3 }; animationList[]= { - "EFS_Hide",1, - "EFS_Cover_Hide",0, + "EFS_Hide",0, + "EFS_Cover_Hide",1, "SAR_Hide",1, "Pole_Hide",1, "Hoist_Hide",0, diff --git a/braf_air/Braf_Helicopters/Braf_Caracal/model.cfg b/braf_air/Braf_Helicopters/Braf_Caracal/model.cfg index 8329242..a11c56f 100644 --- a/braf_air/Braf_Helicopters/Braf_Caracal/model.cfg +++ b/braf_air/Braf_Helicopters/Braf_Caracal/model.cfg @@ -78,8 +78,8 @@ class CfgSkeletons "wheel_r_damper","lg_back", "wheel_r","wheel_r_damper", - "EFS","damagehide", - "EFS_cover","damagehide", + "EFS_cover","", + "EFS","EFS_cover", "SAR","damagehide", "hoist_hook","SAR", @@ -782,7 +782,8 @@ class CfgModels minValue=0; maxValue=1; memory=0; - hideValue=1; + hideValue=0; + unHideValue=1; }; class EFS_Cover_Hide { @@ -795,7 +796,8 @@ class CfgModels minValue=0; maxValue=1; memory=0; - hideValue=1; + hideValue=0; + unHideValue=1; }; class SAR_Hide { @@ -944,4 +946,4 @@ class CfgModels }; }; }; -}; \ No newline at end of file +}; diff --git a/braf_air/Braf_Helicopters/Braf_Fennec/Fennec_Base.hpp b/braf_air/Braf_Helicopters/Braf_Fennec/Fennec_Base.hpp index cd3eb25..5e12806 100644 --- a/braf_air/Braf_Helicopters/Braf_Fennec/Fennec_Base.hpp +++ b/braf_air/Braf_Helicopters/Braf_Fennec/Fennec_Base.hpp @@ -424,19 +424,19 @@ class BRAF_Fennec_Base: Helicopter_Base_H priority=1; onlyForPlayer=0; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; - statement="[this, ""arm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""arm""] call BRAF_fnc_efs"; }; class Disarm_EFS: Arm_EFS { displayname=" Disarm EFS "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""disarm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""disarm""] call BRAF_fnc_efs"; }; class Deploy_Floats: Arm_EFS { displayname=" Deploy Floats "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""deployfloats""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; }; }; class Armory @@ -823,7 +823,7 @@ class BRAF_Fennec_Base: Helicopter_Base_H #include "Fennec_sounds.hpp" class EventHandlers: EventHandlers { - init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"";};"; + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; }; ace_cargo_space=2; class TextureSources @@ -1429,19 +1429,19 @@ class BRAF_Fennec_dynamicLoadout_base: BRAF_Fennec_Base priority=1; onlyForPlayer=0; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; - statement="[this, ""arm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""arm""] call BRAF_fnc_efs"; }; class Disarm_EFS: Arm_EFS { displayname=" Disarm EFS "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""disarm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""disarm""] call BRAF_fnc_efs"; }; class Deploy_Floats: Arm_EFS { displayname=" Deploy Floats "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""deployfloats""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; }; }; }; @@ -1767,32 +1767,32 @@ class BRAF_Fennec_SAR_base: BRAF_Fennec_Base priority=1; onlyForPlayer=0; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'door_L_2' > 0.9 AND !(""BRAF_Rescue_Seat"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="this animate ['Winch_Rot',1]; [this, ""deploy"", ""BRAF_Rescue_Seat""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="this animate ['Winch_Rot',1]; [this, ""deploy"", ""BRAF_Rescue_Seat""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Hoist_Down: Deploy_Rescue_Seat { displayname=" Extend Cable Hook "; condition="this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6 AND (player in crew this) AND this animationphase 'door_L_2' > 0.9"; - statement="[this, ""down""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; + statement="[this, ""down""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; }; class Hoist_Up: Deploy_Rescue_Seat { displayname=" Recover Hoist Hook "; condition="this animationphase 'Hoist_Hide' < -0.9 AND (player in crew this) AND this animationphase 'door_L_2' > 0.9"; - statement="[this, ""up""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; + statement="[this, ""up""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; }; class Recover_Rescue_Seat: Deploy_Rescue_Seat { displayname=" Retrieve Rescue Payload "; condition="(player in crew this) AND this animationphase 'door_L_2' > 0.9 AND this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6"; - statement="[this, ""recover""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Winch_Rot',0]; this animate ['Hoist_Hide',1]"; + statement="[this, ""recover""] call BRAF_fnc_hoist; this animate ['Winch_Rot',0]; this animate ['Hoist_Hide',1]"; }; class Hoist_Cut: Deploy_Rescue_Seat { displayname=" Cut Hoist Hook Cable "; condition="(player in crew this) AND this animationphase 'Hoist_Hide' < 0 AND this animationphase 'door_L_2' > 0.9"; - statement="[this, ""cut""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Winch_Rot',0]; this animate ['Hoist_Hide',1]"; + statement="[this, ""cut""] call BRAF_fnc_hoist; this animate ['Winch_Rot',0]; this animate ['Hoist_Hide',1]"; }; class NVG_ON { @@ -1820,19 +1820,19 @@ class BRAF_Fennec_SAR_base: BRAF_Fennec_Base priority=1; onlyForPlayer=0; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; - statement="[this, ""arm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""arm""] call BRAF_fnc_efs"; }; class Disarm_EFS: Arm_EFS { displayname=" Disarm EFS "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""disarm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""disarm""] call BRAF_fnc_efs"; }; class Deploy_Floats: Arm_EFS { displayname=" Deploy Floats "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""deployfloats""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; }; class Open_Door_Right { @@ -1945,19 +1945,19 @@ class BRAF_Fennec_unarmed_base: BRAF_Fennec_Base priority=1; onlyForPlayer=0; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; - statement="[this, ""arm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""arm""] call BRAF_fnc_efs"; }; class Disarm_EFS: Arm_EFS { displayname=" Disarm EFS "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""disarm""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""disarm""] call BRAF_fnc_efs"; }; class Deploy_Floats: Arm_EFS { displayname=" Deploy Floats "; condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; - statement="[this, ""deployfloats""] execVM ""braf\braf_sar\Braf_Scripts\EFS_Esquilo.sqf"""; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; }; }; }; diff --git a/braf_air/Braf_Helicopters/Braf_Pantera/BRAF_pantera.p3d b/braf_air/Braf_Helicopters/Braf_Pantera/BRAF_pantera.p3d index fe4a694..1bef3cc 100644 --- a/braf_air/Braf_Helicopters/Braf_Pantera/BRAF_pantera.p3d +++ b/braf_air/Braf_Helicopters/Braf_Pantera/BRAF_pantera.p3d @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5e11939850b23581ff824aff5368204b1749aab9e894150c44daaffbe7ad0c6 -size 150206644 +oid sha256:7f7b85bf0610f7d263fc7cd0e1b23ffffcea6c40a1a0255a98edf6e5928b560c +size 150870690 diff --git a/braf_air/Braf_Helicopters/Braf_Pantera/Pantera_Base.hpp b/braf_air/Braf_Helicopters/Braf_Pantera/Pantera_Base.hpp index 2fb1023..49ee153 100644 --- a/braf_air/Braf_Helicopters/Braf_Pantera/Pantera_Base.hpp +++ b/braf_air/Braf_Helicopters/Braf_Pantera/Pantera_Base.hpp @@ -345,37 +345,37 @@ class BRAF_Pantera_Base: Helicopter_Base_H priority=1; onlyForPlayer=0; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Civilian_hide' < 0.1 AND !(""BRAF_Rescue_Seat"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="[this, ""deploy"", ""BRAF_Rescue_Seat""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="[this, ""deploy"", ""BRAF_Rescue_Seat""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Deploy_Rescue_Stretcher: Deploy_Rescue_Seat { displayname=" Deploy Rescue Stretcher "; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Civilian_hide' < 0.1 AND !(""BRAF_Rescue_Stretcher"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="[this, ""deploy"", ""BRAF_Rescue_Stretcher""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="[this, ""deploy"", ""BRAF_Rescue_Stretcher""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Hoist_Down: Deploy_Rescue_Seat { displayname=" Extend Cable Hook "; condition="this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9"; - statement="[this, ""down""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; + statement="[this, ""down""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; }; class Hoist_Up: Deploy_Rescue_Seat { displayname=" Recover Cable Hook "; condition="this animationphase 'Hoist_Hide' < -0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9"; - statement="[this, ""up""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; + statement="[this, ""up""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; }; class Recover_Rescue_Seat: Deploy_Rescue_Seat { displayname=" Retrieve Rescue Payload "; condition="(player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6"; - statement="[this, ""recover""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',1]"; + statement="[this, ""recover""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',1]"; }; class Hoist_Cut: Deploy_Rescue_Seat { displayname=" Cut Hoist Hook Cable "; condition="(player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Hoist_Hide' < 0"; - statement="[this, ""cut""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',1]"; + statement="[this, ""cut""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',1]"; }; class Open_Door_Left { @@ -1307,7 +1307,12 @@ class BRAF_Pantera_K2_SAR: BRAF_Pantera_Base typicalCargo[]={"C_Marshal_F"}; crew="C_Marshal_F"; canFloat=1; - WaterLeakiness=50; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; weapons[]= { }; @@ -1398,6 +1403,12 @@ class BRAF_Pantera_K2_SAR: BRAF_Pantera_Base animPeriod=1; initPhase=0; }; + class EFS_Cover_Hide + { + source="user"; + animPeriod=0; + initPhase=0; + }; class EFS_Hide { source="user"; @@ -1405,6 +1416,10 @@ class BRAF_Pantera_K2_SAR: BRAF_Pantera_Base initPhase=0; }; }; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; + }; class UserActions { class Deploy_Rescue_Seat @@ -1416,37 +1431,37 @@ class BRAF_Pantera_K2_SAR: BRAF_Pantera_Base priority=1; onlyForPlayer=0; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Civilian_hide' < 0.1 AND !(""BRAF_Rescue_Seat"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="[this, ""deploy"", ""BRAF_Rescue_Seat""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="[this, ""deploy"", ""BRAF_Rescue_Seat""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Deploy_Rescue_Stretcher: Deploy_Rescue_Seat { displayname=" Deploy Rescue Stretcher "; condition="this animationphase 'Hoist_Hide' > 0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Civilian_hide' < 0.1 AND !(""BRAF_Rescue_Stretcher"" in (this getVariable ['braf_hoist_spent_payloads', []]))"; - statement="[this, ""deploy"", ""BRAF_Rescue_Stretcher""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]"; + statement="[this, ""deploy"", ""BRAF_Rescue_Stretcher""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]"; }; class Hoist_Down: Deploy_Rescue_Seat { displayname=" Extend Cable Hook "; condition="this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9"; - statement="[this, ""down""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; + statement="[this, ""down""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-1]; this say3d ""Winch"""; }; class Hoist_Up: Deploy_Rescue_Seat { displayname=" Recover Cable Hook "; condition="this animationphase 'Hoist_Hide' < -0.9 AND (player in crew this) AND this animationphase 'Door_R_1' > 0.9"; - statement="[this, ""up""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; + statement="[this, ""up""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',-0.5]; this say3d ""Winch"""; }; class Recover_Rescue_Seat: Deploy_Rescue_Seat { displayname=" Retrieve Rescue Payload "; condition="(player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Hoist_Hide' < -0.4 AND this animationphase 'Hoist_Hide' > -0.6"; - statement="[this, ""recover""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',1]"; + statement="[this, ""recover""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',1]"; }; class Hoist_Cut: Deploy_Rescue_Seat { displayname=" Cut Hoist Hook Cable "; condition="(player in crew this) AND this animationphase 'Door_R_1' > 0.9 AND this animationphase 'Hoist_Hide' < 0"; - statement="[this, ""cut""] execVM ""braf\braf_sar\Braf_Scripts\hoist_controller.sqf""; this animate ['Hoist_Hide',1]"; + statement="[this, ""cut""] call BRAF_fnc_hoist; this animate ['Hoist_Hide',1]"; }; class Open_Door_Left { @@ -1477,12 +1492,34 @@ class BRAF_Pantera_K2_SAR: BRAF_Pantera_Base condition="this animationphase 'Door_R_1' > 0.9 AND (player in crew this)"; statement="this animate ['Door_R_1',0], this animate ['Door_R_2',0], this animate ['Door_R_rot',0], this say3d ""Doors"""; }; - class Deploy_EFS: Open_Door_Left + class Arm_EFS { - displayname=" Deploy EFS "; - condition="this animationphase 'EFS_Hide' < 0.1 AND (player in crew this)"; - statement="this animate ['EFS_Hide',1], this say3d ""EFS"""; + displayname=" Arm EFS "; + position="door_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; + animationList[]= + { + "EFS_Cover_Hide",1, + "EFS_Hide",0 }; }; class BRAF_Pantera_K2_Black: BRAF_Pantera_Base @@ -1981,6 +2018,13 @@ class BRAF_Pantera_K2_Offshore: BRAF_Pantera_Base slingLoadMaxCargoMass=50; typicalCargo[]={"C_Marshal_F"}; crew="C_Marshal_F"; + canFloat=1; + waterDamageEngine=0.2; + waterEffect="HeliWater"; + waterLeakiness=50; + waterPPInVehicle=1; + waterResistance=1; + waterResistanceCoef=0.5; transportSoldier=9; cargoProxyIndexes[]={4,5,6,9,10,11,12,13,14}; getInProxyOrder[]={4,5,6,9,10,11,12,13,14}; @@ -2087,6 +2131,22 @@ class BRAF_Pantera_K2_Offshore: BRAF_Pantera_Base animPeriod=1; initPhase=0; }; + class EFS_Cover_Hide + { + source="user"; + animPeriod=0; + initPhase=0; + }; + class EFS_Hide + { + source="user"; + animPeriod=0; + initPhase=0; + }; + }; + class EventHandlers: EventHandlers + { + init="if (local (_this select 0)) then {[(_this select 0), """", [], false] call bis_fnc_initVehicle; [(_this select 0), ""Init""] call BRAF_fnc_efs;};"; }; class UserActions { @@ -2119,6 +2179,34 @@ class BRAF_Pantera_K2_Offshore: BRAF_Pantera_Base condition="this animationphase 'Door_R_1' > 0.9 AND (player in crew this)"; statement="this animate ['Door_R_1',0], this animate ['Door_R_2',0], this animate ['Door_R_rot',0], this say3d ""Doors"""; }; + class Arm_EFS + { + displayname=" Arm EFS "; + position="door_pos"; + showWindow=1; + radius=10; + priority=1; + onlyForPlayer=0; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'SAFE')"; + statement="[this, ""arm""] call BRAF_fnc_efs"; + }; + class Disarm_EFS: Arm_EFS + { + displayname=" Disarm EFS "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; + statement="[this, ""disarm""] call BRAF_fnc_efs"; + }; + class Deploy_Floats: Arm_EFS + { + displayname=" Deploy Floats "; + condition="getNumber (configOf this >> 'canFloat') == 1 AND this animationphase 'EFS_Cover_Hide' > 0.9 AND (player in crew this) AND ((this getVariable ['braf_efs_state','SAFE']) == 'ARMED')"; + statement="[this, ""deployfloats""] call BRAF_fnc_efs"; + }; + }; + animationList[]= + { + "EFS_Cover_Hide",1, + "EFS_Hide",0 }; }; class BRAF_Pantera_K2_Silver: BRAF_Pantera_Base diff --git a/braf_air/Braf_Helicopters/Braf_Pantera/model.cfg b/braf_air/Braf_Helicopters/Braf_Pantera/model.cfg index 9100a91..a004022 100644 --- a/braf_air/Braf_Helicopters/Braf_Pantera/model.cfg +++ b/braf_air/Braf_Helicopters/Braf_Pantera/model.cfg @@ -1048,6 +1048,20 @@ class CfgModels angle0="rad -18"; angle1="rad 0"; }; + class EFS_Cover_Hide + { + type="hide"; + source="EFS_Cover_Hide"; + selection="EFS_Cover"; + sourceAddress="clamp"; + minPhase=0; + maxPhase=1; + minValue=0; + maxValue=1; + memory=0; + hideValue=0; + unHideValue=1; + }; class EFS_Hide { source="EFS_Hide"; diff --git a/braf_sar/BRAF_Caraca_EFS.p3d b/braf_sar/BRAF_Caraca_EFS.p3d new file mode 100644 index 0000000..20a30b1 --- /dev/null +++ b/braf_sar/BRAF_Caraca_EFS.p3d @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc2945b9767ad39ff4b35eb51862e5bbe7f0c945ad4ab7415d0f8c2f3ef2b46a +size 732749 diff --git a/braf_sar/BRAF_Pantera_EFS.p3d b/braf_sar/BRAF_Pantera_EFS.p3d deleted file mode 100644 index 0728b91..0000000 --- a/braf_sar/BRAF_Pantera_EFS.p3d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1ea445501afe510a05e2557b6e526193ef59904244f760b67903f02d6354114 -size 834197 diff --git a/braf_sar/Braf_Scripts/EFS_Pantera.sqf b/braf_sar/Braf_Scripts/EFS_Pantera.sqf deleted file mode 100644 index 768be9e..0000000 --- a/braf_sar/Braf_Scripts/EFS_Pantera.sqf +++ /dev/null @@ -1,14 +0,0 @@ -// Declaração de variáveis: -params ["_heli"]; - -// Criação e posicionamento do EFS: -sleep 1; -_heli vehicleChat "Deploying Emergency Floating System!"; -private _efs = "BRAF_Pantera_EFS" createVehicle [0, 0, 0]; -_efs setDir (getDir _heli); -_efs setPosASL (_heli modelToWorld [0, 0, 0]); -_efs attachTo [_heli, [0, 0, 0], "efs_spawn"]; - -_heli setVariable ["efs", _efs]; - -_heli; \ No newline at end of file diff --git a/braf_sar/Braf_Scripts/hoist_controller.sqf b/braf_sar/Braf_Scripts/hoist_controller.sqf deleted file mode 100644 index 5ae50e4..0000000 --- a/braf_sar/Braf_Scripts/hoist_controller.sqf +++ /dev/null @@ -1,129 +0,0 @@ -params ["_heli", ["_action", ""], ["_payloadClass", "BRAF_Rescue_Seat"]]; - -private _initialLength = 0.25; -private _targetLength = 25; -private _recoveryLength = 3.1; -private _duration = 16; - -switch (toLower _action) do { - case "deploy": { - private _spentPayloads = _heli getVariable ["braf_hoist_spent_payloads", []]; - - if (_payloadClass in _spentPayloads) exitWith { - _heli vehicleChat "Rescue Payload Expended"; - }; - - private _oldRope = _heli getVariable ["hoistrope", objNull]; - private _oldPayload = _heli getVariable ["rescueseat", objNull]; - - if (!isNull _oldRope) then { - ropeDestroy _oldRope; - }; - - if (!isNull _oldPayload) then { - deleteVehicle _oldPayload; - }; - - sleep 1; - - _heli vehicleChat "Deploying Rescue Payload"; - - private _payload = _payloadClass createVehicle [0, 0, 0]; - _payload setDir (getDir _heli); - _payload setPosASL (_heli modelToWorld [0, 0, -1.5]); - - private _rope = ropeCreate [_heli, "rope_start", _payload, "hoist_point", _initialLength]; - - _heli setVariable ["rescueseat", _payload]; - _heli setVariable ["hoistrope", _rope]; - _heli setVariable ["braf_hoist_payload_class", _payloadClass]; - }; - - case "down": { - private _rope = _heli getVariable ["hoistrope", objNull]; - - if (isNull _rope) exitWith {}; - - private _currentLength = ropeLength _rope; - private _speed = ((_targetLength - _currentLength) max 0.01) / _duration; - - ropeUnwind [_rope, _speed, _targetLength, false]; - }; - - case "up": { - private _rope = _heli getVariable ["hoistrope", objNull]; - - if (isNull _rope) exitWith {}; - - private _currentLength = ropeLength _rope; - private _speed = ((_currentLength - _initialLength) max 0.01) / _duration; - - ropeUnwind [_rope, _speed, _initialLength, false]; - }; - - case "recover": { - private _payload = _heli getVariable ["rescueseat", objNull]; - private _rope = _heli getVariable ["hoistrope", objNull]; - private _currentPayloadClass = _heli getVariable ["braf_hoist_payload_class", ""]; - - if (isNull _rope) exitWith { - _heli vehicleChat "no rope!"; - }; - - if ((ropeLength _rope) <= _recoveryLength) then { - if (!isNull _payload) then { - { - if (!isNil "_x") then { - _x leaveVehicle _payload; - _x action ["GetOut", _payload]; - sleep 0.1; - _payload lock 0; - [_x, _heli] remoteExec ["moveInCargo", _x]; - _x assignAsCargo _heli; - }; - } forEach crew _payload; - - ropeDestroy _rope; - deleteVehicle _payload; - } else { - ropeDestroy _rope; - }; - - _heli setVariable ["rescueseat", nil]; - _heli setVariable ["hoistrope", nil]; - _heli setVariable ["braf_hoist_payload_class", nil]; - - if (_currentPayloadClass != "") then { - private _spentPayloads = _heli getVariable ["braf_hoist_spent_payloads", []]; - _spentPayloads = _spentPayloads - [_currentPayloadClass]; - _heli setVariable ["braf_hoist_spent_payloads", _spentPayloads]; - }; - - _heli vehicleChat "Rescue Payload In Cabin"; - } else { - _heli vehicleChat "First Raise The Rescue Payload To Cabin Door"; - }; - }; - - case "cut": { - private _rope = _heli getVariable ["hoistrope", objNull]; - private _currentPayloadClass = _heli getVariable ["braf_hoist_payload_class", ""]; - - if (isNull _rope) exitWith { - _heli vehicleChat "no rope!"; - }; - - ropeCut [_rope, 0]; - ropeDestroy _rope; - _heli setVariable ["hoistrope", nil]; - - if (_currentPayloadClass != "") then { - private _spentPayloads = _heli getVariable ["braf_hoist_spent_payloads", []]; - - if !(_currentPayloadClass in _spentPayloads) then { - _spentPayloads pushBack _currentPayloadClass; - _heli setVariable ["braf_hoist_spent_payloads", _spentPayloads]; - }; - }; - }; -}; diff --git a/braf_sar/config.cpp b/braf_sar/config.cpp index 85c045d..34de0e9 100644 --- a/braf_sar/config.cpp +++ b/braf_sar/config.cpp @@ -17,12 +17,28 @@ class CfgPatches { "BRAF_Rescue_Seat", "BRAF_Rescue_Basket", - "BRAF_Rescue_Stretcher", - "BRAF_Esquilo_EFS" + "BRAF_Rescue_Stretcher" }; weapons[] = {}; }; }; +class CfgFunctions +{ + class BRAF + { + class functions + { + class efs + { + file = "\braf\braf_sar\functions\fn_efs.sqf"; + }; + class hoist + { + file = "\braf\braf_sar\functions\fn_hoist.sqf"; + }; + }; + }; +}; class CfgVehicles { class Items_base_F; diff --git a/braf_sar/Braf_Scripts/EFS_Esquilo.sqf b/braf_sar/functions/fn_efs.sqf similarity index 95% rename from braf_sar/Braf_Scripts/EFS_Esquilo.sqf rename to braf_sar/functions/fn_efs.sqf index 3700697..8883040 100644 --- a/braf_sar/Braf_Scripts/EFS_Esquilo.sqf +++ b/braf_sar/functions/fn_efs.sqf @@ -27,7 +27,12 @@ private _getConfiguredLeakiness = { private _getEfsCenterASL = { params ["_vehicle"]; - _vehicle modelToWorldWorld (_vehicle selectionPosition ["EFS_center", "Memory"]) + private _center = _vehicle selectionPosition ["EFS_center", "Memory"]; + if (_center isEqualTo [0, 0, 0]) then { + _center = _vehicle selectionPosition ["EFS", "Memory"]; + }; + + _vehicle modelToWorldWorld _center }; private _getWaterSurfaceASL = { diff --git a/braf_sar/functions/fn_hoist.sqf b/braf_sar/functions/fn_hoist.sqf new file mode 100644 index 0000000..800a5a4 --- /dev/null +++ b/braf_sar/functions/fn_hoist.sqf @@ -0,0 +1,133 @@ +params ["_heli", ["_action", ""], ["_payloadClass", "BRAF_Rescue_Seat"]]; + +[_heli, _action, _payloadClass] spawn { + params ["_heli", "_action", "_payloadClass"]; + + private _initialLength = 0.25; + private _targetLength = 25; + private _recoveryLength = 3.1; + private _duration = 16; + + switch (toLower _action) do { + case "deploy": { + private _spentPayloads = _heli getVariable ["braf_hoist_spent_payloads", []]; + + if (_payloadClass in _spentPayloads) exitWith { + _heli vehicleChat "Rescue Payload Expended"; + }; + + private _oldRope = _heli getVariable ["hoistrope", objNull]; + private _oldPayload = _heli getVariable ["rescueseat", objNull]; + + if (!isNull _oldRope) then { + ropeDestroy _oldRope; + }; + + if (!isNull _oldPayload) then { + deleteVehicle _oldPayload; + }; + + sleep 1; + + _heli vehicleChat "Deploying Rescue Payload"; + + private _payload = _payloadClass createVehicle [0, 0, 0]; + _payload setDir (getDir _heli); + _payload setPosASL (_heli modelToWorld [0, 0, -1.5]); + + private _rope = ropeCreate [_heli, "rope_start", _payload, "hoist_point", _initialLength]; + + _heli setVariable ["rescueseat", _payload]; + _heli setVariable ["hoistrope", _rope]; + _heli setVariable ["braf_hoist_payload_class", _payloadClass]; + }; + + case "down": { + private _rope = _heli getVariable ["hoistrope", objNull]; + + if (isNull _rope) exitWith {}; + + private _currentLength = ropeLength _rope; + private _speed = ((_targetLength - _currentLength) max 0.01) / _duration; + + ropeUnwind [_rope, _speed, _targetLength, false]; + }; + + case "up": { + private _rope = _heli getVariable ["hoistrope", objNull]; + + if (isNull _rope) exitWith {}; + + private _currentLength = ropeLength _rope; + private _speed = ((_currentLength - _initialLength) max 0.01) / _duration; + + ropeUnwind [_rope, _speed, _initialLength, false]; + }; + + case "recover": { + private _payload = _heli getVariable ["rescueseat", objNull]; + private _rope = _heli getVariable ["hoistrope", objNull]; + private _currentPayloadClass = _heli getVariable ["braf_hoist_payload_class", ""]; + + if (isNull _rope) exitWith { + _heli vehicleChat "no rope!"; + }; + + if ((ropeLength _rope) <= _recoveryLength) then { + if (!isNull _payload) then { + { + if (!isNil "_x") then { + _x leaveVehicle _payload; + _x action ["GetOut", _payload]; + sleep 0.1; + _payload lock 0; + [_x, _heli] remoteExec ["moveInCargo", _x]; + _x assignAsCargo _heli; + }; + } forEach crew _payload; + + ropeDestroy _rope; + deleteVehicle _payload; + } else { + ropeDestroy _rope; + }; + + _heli setVariable ["rescueseat", nil]; + _heli setVariable ["hoistrope", nil]; + _heli setVariable ["braf_hoist_payload_class", nil]; + + if (_currentPayloadClass != "") then { + private _spentPayloads = _heli getVariable ["braf_hoist_spent_payloads", []]; + _spentPayloads = _spentPayloads - [_currentPayloadClass]; + _heli setVariable ["braf_hoist_spent_payloads", _spentPayloads]; + }; + + _heli vehicleChat "Rescue Payload In Cabin"; + } else { + _heli vehicleChat "First Raise The Rescue Payload To Cabin Door"; + }; + }; + + case "cut": { + private _rope = _heli getVariable ["hoistrope", objNull]; + private _currentPayloadClass = _heli getVariable ["braf_hoist_payload_class", ""]; + + if (isNull _rope) exitWith { + _heli vehicleChat "no rope!"; + }; + + ropeCut [_rope, 0]; + ropeDestroy _rope; + _heli setVariable ["hoistrope", nil]; + + if (_currentPayloadClass != "") then { + private _spentPayloads = _heli getVariable ["braf_hoist_spent_payloads", []]; + + if !(_currentPayloadClass in _spentPayloads) then { + _spentPayloads pushBack _currentPayloadClass; + _heli setVariable ["braf_hoist_spent_payloads", _spentPayloads]; + }; + }; + }; + }; +};