Skip to content

Commit

Permalink
FastRope Sounds - Fix Config, Merge PFEH, Add CC Attribution
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed May 10, 2016
1 parent 7d063d0 commit 980da16
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions AUTHORS.txt
Expand Up @@ -112,6 +112,7 @@ Sniperwolf572 <tenga6@gmail.com>
System98
SzwedzikPL <szwedzikpl@gmail.com>
Tachi <zaveruha007@gmail.com>
Tessa Elieff <Fastroping Sound - CreativeCommons Attributions 3.0>
Toaster <jonathan.pereira@gmail.com>
Tonic
Tourorist <tourorist@gmail.com>
Expand Down
2 changes: 2 additions & 0 deletions LICENSE
Expand Up @@ -26,6 +26,8 @@ Some folders of this project may contain a separate LICENSE file. Should
that be the case, everything in that folder and all subfolders is subject
to that license instead.

- ARMA PUBLIC LICENSE (\addons\apl)
- CreativeCommons Attributions 3.0 (\addons\fastroping\data\sounds)

============================================================================
Full GNU General Public License Text
Expand Down
1 change: 1 addition & 0 deletions addons/fastroping/config.cpp
Expand Up @@ -14,5 +14,6 @@ class CfgPatches {

#include "CfgEventHandlers.hpp"
#include "CfgMoves.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"
#include "CfgWaypoints.hpp"
2 changes: 1 addition & 1 deletion addons/fastroping/functions/fnc_fastRope.sqf
Expand Up @@ -37,4 +37,4 @@ _vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true];
//Start server PFH asap
[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call EFUNC(common,serverEvent);
moveOut _unit;
[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex]] call CBA_fnc_addPerFrameHandler;
[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, ACE_diagTime]] call CBA_fnc_addPerFrameHandler;
19 changes: 7 additions & 12 deletions addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf
Expand Up @@ -17,7 +17,7 @@

#include "script_component.hpp"
params ["_arguments", "_pfhHandle"];
_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex"];
_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_timeToPlayRopeSound"];
_rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"];
private ["_vectorUp", "_vectorDir", "_origin"];

Expand All @@ -29,26 +29,21 @@ if (animationState _unit != "ACE_FastRoping") exitWith {
_unit disableCollisionWith _dummy;
_unit attachTo [_dummy, [0, 0, -1.45]];
[_unit, "ACE_FastRoping", 2] call EFUNC(common,doAnimation);

[{
params ["_args", "_idPFH"];
_args params ["_unit"];

if (isNull (attachedTo _unit)) exitWith {
[_idPFH] call CBA_fnc_removePerFrameHandler;
};

playSound QGVAR(Rope);
}, 1, [_unit]] call CBA_fnc_addPerFrameHandler;
};


//End of fast rope
if (isNull attachedTo _unit) exitWith {
TRACE_1("exit pfeh",_unit);
[_unit, "", 2] call EFUNC(common,doAnimation);
_unit setVectorUp [0, 0, 1];

playSound QGVAR(Thud);

[_pfhHandle] call CBA_fnc_removePerFrameHandler;
};

if (ACE_diagTime > _timeToPlayRopeSound) then {
_arguments set [4, (_timeToPlayRopeSound + 1)];
playSound QGVAR(Rope);
};

0 comments on commit 980da16

Please sign in to comment.