From 4c70125409853e23306202ae72f02bfa14e6d13a Mon Sep 17 00:00:00 2001 From: Arantes83 Date: Wed, 24 Jun 2026 16:04:38 -0300 Subject: [PATCH] fix(sar): align hoist timing with winch audio --- CHANGELOG.md | 31 ++++++++++++++------------ braf_sar/Braf_Scripts/DRS.sqf | 26 +++++++++------------ braf_sar/Braf_Scripts/hoist_cut.sqf | 17 ++++++++------ braf_sar/Braf_Scripts/hoist_down.sqf | 17 ++++++++++---- braf_sar/Braf_Scripts/hoist_up.sqf | 17 ++++++++++---- braf_sar/Braf_Scripts/recover_seat.sqf | 17 +++++++------- 6 files changed, 72 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a543f4c..99a33b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,23 +2,26 @@ ## 2026-06-24 -### braf_air +### braf_optics_air -- Adicionada dependência de `BRAF_Optics_Air` em `braf_air/config.cpp`. -- Integrado o FLIR standalone nas duas variantes do Fennec com torreta (`BRAF_Fennec_dynamicLoadout_base` e `BRAF_Fennec_SAR_base`). -- Integrado o FLIR standalone no Caracal SAR pela base `BRAF_Caracal_2`, propagando para as variantes herdadas `BRAF_Caracal_5` e `BRAF_Caracal_8`. -- Padronizados os limites de câmera usados no optics para o mesmo conjunto adotado no A-29 e no Fennec: `minElev=-120`, `maxElev=30`, `initElev=0`, `minTurn=-180`, `maxTurn=180`, `initTurn=0`. -- Substituído o optics vanilla `RscOptics_Heli_Attack_01_gunner` por `BRAF_RscOptics_Air_FLIR`. -- Substituídos os modelos vanilla de optics pelos modelos standalone `StarSaphire` em `WFOV`, `MFOV`, `NFOV`, `NFOV 2X` e `NFOV 4X`. +- Criado o novo modulo standalone `braf_optics_air` para concentrar o sistema FLIR das aeronaves. +- O novo modulo traz uma interface propria de optics com HUD customizado, funcoes dedicadas e modelos `StarSaphire` para `WFOV`, `MFOV`, `NFOV`, `NFOV 2X` e `NFOV 4X`. +- Essa mudanca permite reutilizar o mesmo sistema entre multiplas aeronaves sem manter copias internas separadas em cada PBO. ### braf_air2 -- O A-29 deixou de usar o optics como módulo interno e passou a consumir o addon standalone `braf_optics_air`. -- Removidos de `braf_air2` os scripts, funções, assets, `p3d`, `paa`, include de config e referências legadas do optics interno. -- Atualizada a torreta do A-29 para usar `BRAF_RscOptics_Air_FLIR` e os modelos externos de `braf_optics_air`. -- Resultado: `braf_air2` deixou de ser dono do runtime de optics e passou a depender do módulo independente, facilitando o reuso por outras aeronaves. +- O A-29 deixou de usar o optics como modulo interno e passou a consumir o sistema centralizado de `braf_optics_air`. +- Foram removidos do `braf_air2` os scripts, funcoes, assets, modelos e referencias antigas ligados ao optics interno do A-29. +- A torreta do A-29 foi atualizada para usar o novo `BRAF_RscOptics_Air_FLIR` e os modelos externos de `braf_optics_air`. +- Esta atualizacao leva para o BRAF um sistema FLIR mais completo, moderno e reutilizavel para substituir esse arranjo antigo. -### Referências +### braf_air -- `5df0649` `refactor(air2): move A-29 optics to standalone addon` -- `4da55a1` `fix(optics): keep standalone air FLIR module independent` +- O novo FLIR standalone foi integrado nas variantes do Fennec e do Caracal com torreta. + +### braf_sar + +- Ajustada a logica do guincho para que a extensao do cabo dure os mesmos 16 segundos do audio do motor do winch. +- Ajustada tambem a velocidade de recolhimento do cabo para seguir a mesma duracao de 16 segundos. +- Os scripts de deploy, descida, subida, corte e recuperacao do rescue seat foram padronizados para uso geral em helicopteros, sem referencia direta a uma aeronave especifica. +- O fluxo atual foi consolidado funcionalmente para Fennec, Pantera e Caracal, preparando o sistema para a futura expansao com novos payloads de resgate. diff --git a/braf_sar/Braf_Scripts/DRS.sqf b/braf_sar/Braf_Scripts/DRS.sqf index dc2b823..901883d 100644 --- a/braf_sar/Braf_Scripts/DRS.sqf +++ b/braf_sar/Braf_Scripts/DRS.sqf @@ -1,27 +1,21 @@ -// Declaração de variáveis: +// Declaracao de variaveis: params ["_heli"]; -// Criação e posicionamento do assento: - // Espera de 1 segundo sleep 1; // Texto que aparece no side channel _heli vehicleChat "Deploying Rescue Seat"; -// Criação do veículo _rescueseat -private _rescueseat = "BRAF_Rescue_Seat" createVehicle [0, 0, 0]; +// Criacao e posicionamento do assento +private _rescueSeat = "BRAF_Rescue_Seat" createVehicle [0, 0, 0]; +_rescueSeat setDir (getDir _heli); +_rescueSeat setPosASL (_heli modelToWorld [0, 0, -1.5]); -// Mudança de Orientação do _rescueseat -_rescueseat setDir (getDir _heli); +// Criacao do cabo +private _hoistRope = ropeCreate [_heli, "rope_start", _rescueSeat, "hoist_point", 0.25]; -// Mudança de posição do _rescueseat -_rescueseat setPosASL (_heli modelToWorld [0, 0, -1.5]); +_heli setVariable ["rescueseat", _rescueSeat]; +_heli setVariable ["hoistrope", _hoistRope]; -// Criação do Cabo -private _hoistrope = ropeCreate [_heli, "rope_start", _rescueseat, "hoist_point", 0.25]; - -_heli setVariable ["rescueseat", _rescueseat]; -_heli setVariable ["hoistrope", _hoistrope]; - -_heli; \ No newline at end of file +_heli; diff --git a/braf_sar/Braf_Scripts/hoist_cut.sqf b/braf_sar/Braf_Scripts/hoist_cut.sqf index ddae538..fd10304 100644 --- a/braf_sar/Braf_Scripts/hoist_cut.sqf +++ b/braf_sar/Braf_Scripts/hoist_cut.sqf @@ -1,10 +1,13 @@ -// Declaração de variáveis -params ["_panther"]; -// Corte do Cabo -private _rope = _panther getVariable ["hoistrope", objNull]; -if (isNull _rope) then { - _panther vehicleChat "no rope!"; +// Declaracao de variaveis +params ["_heli"]; + +private _rope = _heli getVariable ["hoistrope", objNull]; + +if (isNull _rope) exitWith { + _heli vehicleChat "no rope!"; }; + +// Corte do cabo ropeCut [_rope, 0]; ropeDestroy _rope; -_panther setVariable ["hoistrope", nil]; \ No newline at end of file +_heli setVariable ["hoistrope", nil]; diff --git a/braf_sar/Braf_Scripts/hoist_down.sqf b/braf_sar/Braf_Scripts/hoist_down.sqf index cfd8d23..b175120 100644 --- a/braf_sar/Braf_Scripts/hoist_down.sqf +++ b/braf_sar/Braf_Scripts/hoist_down.sqf @@ -1,5 +1,14 @@ -// Declaração de variáveis: -params ["_panther"]; +// Declaracao de variaveis: +params ["_heli"]; -// Extensão do Cabo -ropeUnwind [_panther getVariable "hoistrope", 1.15, 25, false]; \ No newline at end of file +private _rope = _heli getVariable ["hoistrope", objNull]; + +if (isNull _rope) exitWith {}; + +private _targetLength = 25; +private _duration = 16; +private _currentLength = ropeLength _rope; +private _speed = ((_targetLength - _currentLength) max 0.01) / _duration; + +// Extensao do cabo com duracao alinhada ao audio do guincho. +ropeUnwind [_rope, _speed, _targetLength, false]; diff --git a/braf_sar/Braf_Scripts/hoist_up.sqf b/braf_sar/Braf_Scripts/hoist_up.sqf index 0e15a80..beb8d7c 100644 --- a/braf_sar/Braf_Scripts/hoist_up.sqf +++ b/braf_sar/Braf_Scripts/hoist_up.sqf @@ -1,5 +1,14 @@ -// Declaração de variáveis -params ["_panther"]; +// Declaracao de variaveis +params ["_heli"]; -// Recuperação do Cabo -ropeUnwind [_panther getVariable "hoistrope", 1.15, 0.25, false]; \ No newline at end of file +private _rope = _heli getVariable ["hoistrope", objNull]; + +if (isNull _rope) exitWith {}; + +private _targetLength = 0.25; +private _duration = 16; +private _currentLength = ropeLength _rope; +private _speed = ((_currentLength - _targetLength) max 0.01) / _duration; + +// Recuperacao do cabo com duracao alinhada ao audio do guincho. +ropeUnwind [_rope, _speed, _targetLength, false]; diff --git a/braf_sar/Braf_Scripts/recover_seat.sqf b/braf_sar/Braf_Scripts/recover_seat.sqf index a264841..3072ebc 100644 --- a/braf_sar/Braf_Scripts/recover_seat.sqf +++ b/braf_sar/Braf_Scripts/recover_seat.sqf @@ -1,25 +1,27 @@ -// Declaração de variáveis -params ["_heli", "_player"]; +// Declaracao de variaveis +params ["_heli"]; -// Récupération des victimes (thx to Tetet) private _basket = _heli getVariable ["rescueseat", objNull]; private _rope = _heli getVariable ["hoistrope", objNull]; -private _length = ropeLength _rope; -if (isNull _rope) then { +if (isNull _rope) exitWith { _heli vehicleChat "no rope!"; }; + +private _length = ropeLength _rope; + if (_length <= 3.1) then { { if (!isNil "_x") then { _x leaveVehicle _basket; - _x action["GetOut", _basket]; + _x action ["GetOut", _basket]; sleep 0.1; _basket lock 0; [_x, _heli] remoteExec ["moveInCargo", _x]; _x assignAsCargo _heli; }; } forEach crew _basket; + ropeDestroy _rope; deleteVehicle _basket; _heli setVariable ["rescueseat", nil]; @@ -29,6 +31,5 @@ if (_length <= 3.1) then { _heli vehicleChat "First Raise The Basket To Cabin Door"; }; -// Corte do Cabo // ropeCut [_heli getVariable "hoistrope", 0]; -// deleteVehicle (_heli getVariable "rescueseat"); \ No newline at end of file +// deleteVehicle (_heli getVariable "rescueseat");