mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixes for animations and script error
This commit is contained in:
parent
2bee533a8c
commit
62460e8b79
@ -12,6 +12,7 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
|
||||
["Medical_treatmentCompleted", FUNC(onTreatmentCompleted)] call ace_common_fnc_addEventHandler;
|
||||
["medical_propagateWound", FUNC(onPropagateWound)] call ace_common_fnc_addEventHandler;
|
||||
["medical_woundUpdateRequest", FUNC(onWoundUpdateRequest)] call ace_common_fnc_addEventHandler;
|
||||
["carryObjectDropped", FUNC(onCarryObjectDropped)] call ace_common_fnc_addEventHandler;
|
||||
|
||||
// Initialize all effects
|
||||
_fnc_createEffect = {
|
||||
|
@ -38,7 +38,9 @@ if !([_caller,_target] call EFUNC(common,carryObj)) exitwith {};
|
||||
if (primaryWeapon _caller == "") then {
|
||||
_caller addWeapon "ACE_FakePrimaryWeapon";
|
||||
};
|
||||
_caller selectWeapon (primaryWeapon _caller);
|
||||
if (currentWeapon _caller != (primaryWeapon _caller)) then {
|
||||
_caller selectWeapon (primaryWeapon _caller);
|
||||
};
|
||||
|
||||
if (_carry) then {
|
||||
_target attachTo [_caller, [0.1, -0.1, -1.25], "LeftShoulder"];
|
||||
@ -48,16 +50,19 @@ if (_carry) then {
|
||||
_target attachTo [_caller, [0.125, 1.007, 0]];
|
||||
_target setDir (getDir _target + 180) % 360;
|
||||
_target setPos ((getPos _target) vectorAdd ((vectorDir _caller) vectorMultiply 1.5));
|
||||
[_caller, "AcinPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
[_target, "AinjPpneMstpSnonWrflDb", 2, true] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
[
|
||||
2,
|
||||
[_caller, _target, _carry],
|
||||
{
|
||||
private ["_caller","_target"];
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
_carry = _this select 2;
|
||||
private ["_caller","_target", "_carry", "_args"];
|
||||
_args = _this select 0;
|
||||
_caller = _args select 0;
|
||||
_target = _args select 1;
|
||||
_carry = _args select 2;
|
||||
|
||||
_target setvariable [QGVAR(beingCarried), _caller, true];
|
||||
_caller setvariable [QGVAR(carrying), _target, true];
|
||||
|
@ -18,7 +18,10 @@ _caller = _this select 0;
|
||||
_target = _caller getvariable [QGVAR(carrying), objNull];
|
||||
_carrying = _caller getvariable [QGVAR(isCarrying), -1];
|
||||
|
||||
systemChat format["handle onCarryObjectDropped %1", [_this, _target, _carrying]];
|
||||
|
||||
if (_carrying >= 0) then {
|
||||
|
||||
_caller setvariable [QGVAR(isCarrying), -1, true];
|
||||
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
|
||||
_caller removeWeapon "ACE_FakePrimaryWeapon";
|
||||
@ -28,7 +31,7 @@ if (_carrying >= 0) then {
|
||||
_caller setvariable[QGVAR(onStartMovingUnitParams), nil];
|
||||
|
||||
// handle the drag & carry administration
|
||||
if (_dragging) then {
|
||||
if (_carrying == 0) then {
|
||||
_target setvariable [QGVAR(beingDragged), nil, true];
|
||||
_caller setvariable [QGVAR(dragging), nil, true];
|
||||
} else {
|
||||
@ -42,7 +45,7 @@ if (_carrying >= 0) then {
|
||||
};
|
||||
|
||||
if (vehicle _target == _target) then {
|
||||
if (_dragging) then {
|
||||
if (_carrying == 0) then {
|
||||
[_target,"AinjPpneMstpSnonWrflDb_release", 2, true] call EFUNC(common,doAnimation);
|
||||
} else {
|
||||
[_target,"AinjPfalMstpSnonWrflDnon_carried_Down", 2, true] call EFUNC(common,doAnimation);
|
||||
|
Loading…
Reference in New Issue
Block a user