mirror of
https://github.com/sethduda/AdvancedRappelling.git
synced 2024-08-30 17:22:12 +00:00
Fixing animations, adding ability to aim in a 50-degree range
This commit is contained in:
parent
c2d72ce5dd
commit
63c3a480f8
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 14 KiB |
Binary file not shown.
@ -6,9 +6,6 @@ class CfgMovesBasic
|
||||
class ManActions
|
||||
{
|
||||
AR_01="AR_01_Idle";
|
||||
AR_01_Jump1 = "";
|
||||
AR_01_Jump2 = "";
|
||||
AR_01_Jump3 = "";
|
||||
|
||||
};
|
||||
class Actions
|
||||
@ -274,8 +271,7 @@ class CfgMovesMaleSdr: CfgMovesBasic
|
||||
class AR_01_Aim: cargo_base_Rope
|
||||
{
|
||||
actions="AR_01_Actions";
|
||||
leftHandIKCurve[]={0};
|
||||
rightHandIKCurve[]={0};
|
||||
leftHandIKCurve[]={1};
|
||||
minPlayTime = 0.1;
|
||||
file="\AR_AdvancedRappelling\anims\Rup_RopeFX_01_aim.rtm"; /// what file is going to be played in this state
|
||||
speed=100000;
|
||||
@ -329,7 +325,6 @@ class CfgMovesMaleSdr: CfgMovesBasic
|
||||
minPlayTime = 0.1;
|
||||
aiming="aimingDefault";
|
||||
leftHandIKCurve[]={0};
|
||||
rightHandIKCurve[]={0};
|
||||
InterpolateTo[]=
|
||||
{
|
||||
"AR_01_Aim",
|
||||
@ -363,7 +358,7 @@ class CfgMovesMaleSdr: CfgMovesBasic
|
||||
variantsPlayer[]={};
|
||||
headBobStrength=0;
|
||||
soundEnabled=1;
|
||||
file="\AR_AdvancedRappelling\anims\Rup_RopeFX_01_idle.rtm";
|
||||
file="\AR_AdvancedRappelling\anims\Rup_RopeFX_01_idle1.rtm";
|
||||
speed=-10;
|
||||
ConnectTo[]=
|
||||
{
|
||||
|
@ -147,7 +147,7 @@ AR_Play_Rappelling_Sounds_Global = {
|
||||
|
||||
AR_Play_Rappelling_Sounds = {
|
||||
params ["_player","_rappelDevice","_rappelAncor"];
|
||||
if(!hasInterface || !(call AUR_Has_Addon_Sounds_Installed) ) exitWith {};
|
||||
if(!hasInterface || !(call AR_Has_Addon_Sounds_Installed) ) exitWith {};
|
||||
if(player distance _player < 15) then {
|
||||
[_player, "AR_Rappel_Start"] call AR_Play_3D_Sound;
|
||||
[_rappelDevice, "AR_Rappel_Loop"] call AR_Play_3D_Sound;
|
||||
@ -375,7 +375,7 @@ AR_Client_Rappel_From_Heli = {
|
||||
|
||||
[[_player,_rappelDevice,_anchor],"AR_Play_Rappelling_Sounds_Global"] call AR_RemoteExecServer;
|
||||
|
||||
_rope2 = ropeCreate [_rappelDevice, [0.16,0,0], 60];
|
||||
_rope2 = ropeCreate [_rappelDevice, [-0.15,0,0], 60];
|
||||
_rope2 allowDamage false;
|
||||
_rope1 = ropeCreate [_rappelDevice, [0,0.15,0], _anchor, [0, 0, 0], 3];
|
||||
_rope1 allowDamage false;
|
||||
@ -389,8 +389,9 @@ AR_Client_Rappel_From_Heli = {
|
||||
_velocityVec = [0,0,0];
|
||||
_lastTime = diag_tickTime;
|
||||
_lastPosition = AGLtoASL (_rappelDevice modelToWorldVisual [0,0,0]);
|
||||
_dir = random 365;
|
||||
_dirSpinFactor = ((random 10) - 5) / 5;
|
||||
_lookDirFreedom = 50;
|
||||
_dir = (random 360) + (_lookDirFreedom / 2);
|
||||
_dirSpinFactor = (((random 10) - 5) / 5) max 0.1;
|
||||
|
||||
_decendRopeKeyDownHandler = -1;
|
||||
if(_player == player) then {
|
||||
@ -465,8 +466,35 @@ AR_Client_Rappel_From_Heli = {
|
||||
_player setVelocity [0,0,0];
|
||||
|
||||
// Fix player direction
|
||||
_player setDir _dir;
|
||||
_dir = _dir + ((360/1000) * _dirSpinFactor);
|
||||
if(isPlayer _player) then {
|
||||
_currentDir = getDir _player;
|
||||
_minDir = (_dir - (_lookDirFreedom/2)) mod 360;
|
||||
_maxDir = (_dir + (_lookDirFreedom/2)) mod 360;
|
||||
_minDegreesToMax = 0;
|
||||
_minDegreesToMin = 0;
|
||||
if( _currentDir > _maxDir ) then {
|
||||
_minDegreesToMax = (_currentDir - _maxDir) min (360 - _currentDir + _maxDir);
|
||||
};
|
||||
if( _currentDir < _maxDir ) then {
|
||||
_minDegreesToMax = (_maxDir - _currentDir) min (360 - _maxDir + _currentDir);
|
||||
};
|
||||
if( _currentDir > _minDir ) then {
|
||||
_minDegreesToMin = (_currentDir - _minDir) min (360 - _currentDir + _minDir);
|
||||
};
|
||||
if( _currentDir < _minDir ) then {
|
||||
_minDegreesToMin = (_minDir - _currentDir) min (360 - _minDir + _currentDir);
|
||||
};
|
||||
if( _minDegreesToMin > _lookDirFreedom || _minDegreesToMax > _lookDirFreedom ) then {
|
||||
if( _minDegreesToMin < _minDegreesToMax ) then {
|
||||
_player setDir _minDir;
|
||||
} else {
|
||||
_player setDir _maxDir;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_player setDir _dir;
|
||||
};
|
||||
|
||||
_lastPosition = _newPosition;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user