From 628d33984d9228f1781d13a65fbb80f35facc899 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:55:24 +0300 Subject: init --- Client/Module/ISIS/ISIS_Action.sqf | 1 + Client/Module/ISIS/ISIS_Clientfx.sqf | 63 ++++++++++++++++++++++++++++++ Client/Module/ISIS/ISIS_Heal.sqf | 76 ++++++++++++++++++++++++++++++++++++ Client/Module/ISIS/ISIS_Wound.sqf | 62 +++++++++++++++++++++++++++++ Client/Module/ISIS/ISIS_Wounded.sqf | 51 ++++++++++++++++++++++++ 5 files changed, 253 insertions(+) create mode 100644 Client/Module/ISIS/ISIS_Action.sqf create mode 100644 Client/Module/ISIS/ISIS_Clientfx.sqf create mode 100644 Client/Module/ISIS/ISIS_Heal.sqf create mode 100644 Client/Module/ISIS/ISIS_Wound.sqf create mode 100644 Client/Module/ISIS/ISIS_Wounded.sqf (limited to 'Client/Module/ISIS') diff --git a/Client/Module/ISIS/ISIS_Action.sqf b/Client/Module/ISIS/ISIS_Action.sqf new file mode 100644 index 0000000..6d40ba5 --- /dev/null +++ b/Client/Module/ISIS/ISIS_Action.sqf @@ -0,0 +1 @@ +_this Spawn ISIS_Heal; \ No newline at end of file diff --git a/Client/Module/ISIS/ISIS_Clientfx.sqf b/Client/Module/ISIS/ISIS_Clientfx.sqf new file mode 100644 index 0000000..496747d --- /dev/null +++ b/Client/Module/ISIS/ISIS_Clientfx.sqf @@ -0,0 +1,63 @@ +Private ["_camera","_nu","_ran","_stunned","_unit"]; + +_unit = _this select 0; + +titleCut["","BLACK FADED",0]; +titleCut["","BLACK IN",2]; + +"dynamicBlur" ppEffectEnable true; +"dynamicBlur" ppEffectAdjust [1]; +"dynamicBlur" ppEffectCommit 0.1; + +"colorCorrections" ppEffectCommit 0.1; +"colorCorrections" ppEffectEnable true; +"colorCorrections" ppEffectAdjust [1, 1, 0, [0.1, 0.0, 0.0, 0.5], [0, 0.5, 0.5, 0.5], [0.199, 0.187, 0.114, 0.0]]; +"colorCorrections" ppEffectCommit 0.3; + +_camera = "camera" camCreate (getPos player); + +showCinemaBorder true; + +_camera camSetDir 0; +_camera camSetFov 0.200; +_camera cameraEffect["Internal","back"]; +_camera camSetTarget player; +_camera camSetRelPos [2,2,3]; +_camera camCommit 0; + +_nu = [_camera] Spawn { + private ["_camera","_rx","_ry","_rz","_shout","_shoutTrsl","_ran"]; + _camera = _this select 0; + _shout = ["ImHitE","ImBleedingE","SomebodyHelpMeE","GetMeACorpsmanNowE","CorpsmanE","TheyGotMeE","NeedHelpE","WoundedE"]; + _shoutTrsl = ["I'm hit!","I'm bleeding!","Somebody help me!","Get me a corpsman now!","Corpsman!","They got me!","Need help!","Wounded!"]; + while {true} do { + _rx = 1 + random 7; + _ry = 1 + random 7; + _rz = 1 + random 7; + + _camera camSetRelPos [_rx,_ry,_rz]; + _camera camCommit 10; + waitUntil{camCommitted _camera}; + if (random 100 < 20) then { + _ran = round(random((count _shout)-1)); + player kbTell [sideHQ, WFBE_V_HQTopicSide, "simple",["1","",(_shoutTrsl select _ran),[(_shout select _ran)]],true]; + }; + }; +}; + +while {true} do { + sleep 1; + _stunned = _unit getVariable "stunned"; + if (isNil '_stunned') exitWith {}; + if (!alive _unit || !(_unit getVariable "stunned")) exitWith {}; +}; + +terminate _nu; +showCinemaBorder false; + +if (!playerDead) then { + "dynamicBlur" ppEffectEnable false; + "colorCorrections" ppEffectEnable false; + _camera cameraEffect["TERMINATE","BACK"]; + camDestroy _camera; +}; \ No newline at end of file diff --git a/Client/Module/ISIS/ISIS_Heal.sqf b/Client/Module/ISIS/ISIS_Heal.sqf new file mode 100644 index 0000000..79d447c --- /dev/null +++ b/Client/Module/ISIS/ISIS_Heal.sqf @@ -0,0 +1,76 @@ +Private ['_anim','_anims','_canBePlaceAt','_dy','_dx','_fPos','_healer','_healTime','_injured','_near','_nearA','_nearB','_placeAtA','_posA','_posB','_posh','_posi','_relPosA','_relPosB','_success']; + +_injured = _this select 0; +_healer = _this select 1; + +_posA = [0.75,0.15,0]; +_posB = [-0.75,0.1,0]; + +_relPosA = _injured modelToWorld [((_injured worldToModel (getPos _injured)) select 0) +(0.75),((_injured worldToModel (getPos _injured)) select 1) + (0.15),0]; +_relPosB = _injured modelToWorld [((_injured worldToModel (getPos _injured)) select 0) -(0.75),((_injured worldToModel (getPos _injured)) select 1) + (0.1),0]; + +_placeAtA = objNull; +_near = ((getPos _injured) nearEntities ["Man",10]) - [_healer,_injured]; +_nearA = 0; +_nearB = 0; +if (count _near > 0) then { + { + _nearA = if (_x distance _relPosA < 1) then {1 + _nearA} else {0 + _nearA}; + _nearB = if (_x distance _relPosB < 1) then {1 + _nearB} else {0 + _nearB}; + } forEach _near; +}; + +if (_nearA > 0 && _nearB > 0) exitWith {}; + +_placeAtA = objNull; +if (_nearA == 0 && _nearB == 0) then { + _placeAtA = if (_healer distance _relPosA < _healer distance _relPosB) then {true} else {false}; +} else { + if (_nearA > 0 && _nearB == 0) then {_placeAtA = false} else {true}; + if (_nearB > 0 && _nearA == 0) then {_placeAtA = true} else {false}; +}; + +_fPos = if (_placeAtA) then {_posA} else {_posB}; + +_healer playAction "medicStartRightSide"; +_healer attachTo [_injured, _fPos]; +sleep 0.01; + +_posh = _healer modelToWorld [0,0,0]; +_posi = _injured modelToWorld [0,+0.08,0]; +_dy = (_posh select 1) - (_posi select 1); _dx = (_posh select 0) - (_posi select 0); +_healer setDir (270- (_dy atan2 _dx) - direction _injured); + +_healTime = time; +_anims = [ +"ainvpknlmstpsnonwrfldnon_medic", +"ainvpknlmstpsnonwrfldnon_medic0s", +"ainvpknlmstpsnonwrfldnon_medic0", +"ainvpknlmstpsnonwrfldnon_medic1", +"ainvpknlmstpsnonwrfldnon_medic2", +"ainvpknlmstpsnonwrfldnon_medic3", +"ainvpknlmstpsnonwrfldnon_medic4", +"ainvpknlmstpsnonwrfldnon_medic5", +"ainvpknlmstpsnonwrfldr_medic0s", +"ainvpknlmstpsnonwrfldr_medic0", +"ainvpknlmstpsnonwrfldr_medic1", +"ainvpknlmstpsnonwrfldr_medic2", +"ainvpknlmstpsnonwrfldr_medic3", +"ainvpknlmstpsnonwrfldr_medic4", +"ainvpknlmstpsnonwrfldr_medic5", +"amovppnemstpsraswrfldnon_amovpknlmstpsraswrfldnon", +"ainvpknlmstpsnonwrfldnon_ainvpknlmstpsnonwrfldnon_medic" +]; + +sleep 2; + +while {true} do { + sleep 0.5; + _anim = animationState _healer; + if !(_anim in _anims) exitWith {diag_log Format["%1",animationState _healer]}; + if (!alive _injured || !(_injured getVariable "stunned")) exitWith {_healer playActionNow "medicStop"}; + if (time - _healTime > 40) exitWith {_healer playActionNow "medicStop";_injured setVariable ["stunned",false,true]}; + if !(alive _healer) exitWith {}; +}; + +detach _healer; \ No newline at end of file diff --git a/Client/Module/ISIS/ISIS_Wound.sqf b/Client/Module/ISIS/ISIS_Wound.sqf new file mode 100644 index 0000000..3638718 --- /dev/null +++ b/Client/Module/ISIS/ISIS_Wound.sqf @@ -0,0 +1,62 @@ +Private ["_damage","_damages","_isStuned","_lastWound","_type","_unit"]; + +_unit = _this select 0; +_type = _this select 1; +_damages = _this select 2; + +if (vehicle _unit == _unit) then { + _isStuned = _unit getVariable "stunned"; + _lastWound = _unit getVariable "lastWound"; + if (isNil "_isStuned") then {_isStuned = false}; + if (isNil "_lastWound") then {_lastWound = round(time)}; + if (_isStuned) exitWith { + if (time - _lastWound > 3) then {_damages} else {false} + }; + + _unit setVariable ["lastWound",round time]; + _damage = true; + + switch (_type) do { + case "head_hit": { + if (_damages > 0.4 && _damages < 1) then { + if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 5) then { + if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "body": { + if (_damages > 0.65 && _damages < 1) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 20) then { + if (random 100 > 40) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "hands": { + if (_damages > 0.76 && _damages < 1) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 20) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "legs": { + if (_damages > 0.68 && _damages < 1) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true}; + }; + if (_damages >= 1 && _damages < 20) then { + if (random 100 > 50) then {_unit setVariable ['stunned',true,true];_isStuned = true;_damage = false}; + }; + }; + case "": { + _damage = false; + }; + }; + + if (_isStuned) then {[_unit] Spawn ISIS_Wounded}; + + if (_damage) then {_damages} else {false}; +} else { + _damages +}; \ No newline at end of file diff --git a/Client/Module/ISIS/ISIS_Wounded.sqf b/Client/Module/ISIS/ISIS_Wounded.sqf new file mode 100644 index 0000000..f474f68 --- /dev/null +++ b/Client/Module/ISIS/ISIS_Wounded.sqf @@ -0,0 +1,51 @@ +Private ["_han","_hasAction","_start","_state","_status","_unit"]; +_unit = _this select 0; +_start = time; +_state = ""; + +if (isPlayer _unit) then { + [_unit] Spawn ISIS_Effects; +}; + +_han = [nil, _unit, rPLAYACTION, "agonyStart"] call RE; +sleep 3; +_han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE; + +//--- Add action to west or east units. +if (side _unit == west || side _unit == east) then { + _hasAction = _unit getVariable 'hasAction'; + if (isNil '_hasAction') then {_hasAction = false}; + if !(_hasAction) then { + WFBE_ISIS_AddAction = [(side _unit),'CLTFNCISIS_ADDACTION',_unit]; + publicVariable 'WFBE_ISIS_AddAction'; + if (isHostedServer || local player) then {[(side _unit),'CLTFNCISIS_ADDACTION',_unit] Spawn HandlePVF}; + }; +}; + +while {true} do { + sleep 0.7; + + _status = _unit getVariable "stunned"; + if (isNil '_status' || !(alive _unit)) exitWith {_unit removeAllEventHandlers "handleDamage"}; + if !(_status) exitWith { + _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE; + }; + + if ((time - _start > 15 || _state != animationState _unit)) then { + _start = time; + if (((animationState _unit) == "AinjPpneMstpSnonWnonDnon") || ((animationState _unit) == "AinjPpneMstpSnonWrflDnon")) then { + _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE; + _state = animationState _unit; + _han = [nil, _unit, rPLAYACTION, ("GestureSpasm"+ (str floor random 7))] call RE; + }; + if (((animationState _unit) == "AinjPpneMstpSnonWrflDnon_injuredHealed") || ((animationState _unit) == "AinjPpneMstpSnonWnonDnon_injuredHealed")) then { + _han = [nil, _unit, rPLAYACTION, "GestureNod"] call RE; + _state = animationState _unit; + _han = [nil, _unit, rPLAYACTION, ("GestureSpasm"+ (str floor random 7))] call RE; + }; + }; + + _unit setDamage (getDammage _unit + 0.002); +}; + +_han = [nil, _unit, rPLAYACTION, "agonyStop"] call RE; -- cgit v1.3.1