Merge remote-tracking branch 'upstream/master' into Event-hanlder-replacement

This commit is contained in:
lambdatiger 2024-07-19 10:51:23 -05:00
commit 160bb15962
5 changed files with 45 additions and 29 deletions

View File

@ -4,7 +4,7 @@
* Gets a random animations from the list.
*
* Arguments:
* None
* 0: Object to get animation pool from <OBJECT> (default: objNull)
*
* Return Value:
* Random Animation <STRING>
@ -15,30 +15,42 @@
* Public: No
*/
params [["_object", objNull, [objNull]]];
private _animations = [];
if (!isNull _object) then {
_animations = getArray (configOf _object >> QGVAR(animations));
};
if (_animations isEqualTo []) then {
_animations = [
QGVAR(HubSittingChairA_idle1),
QGVAR(HubSittingChairA_idle2),
QGVAR(HubSittingChairA_idle3),
QGVAR(HubSittingChairA_move1),
QGVAR(HubSittingChairB_idle1),
QGVAR(HubSittingChairB_idle2),
QGVAR(HubSittingChairB_idle3),
QGVAR(HubSittingChairB_move1),
QGVAR(HubSittingChairC_idle1),
QGVAR(HubSittingChairC_idle2),
QGVAR(HubSittingChairC_idle3),
QGVAR(HubSittingChairC_move1),
QGVAR(HubSittingChairUA_idle1),
QGVAR(HubSittingChairUA_idle2),
QGVAR(HubSittingChairUA_idle3),
QGVAR(HubSittingChairUA_move1),
QGVAR(HubSittingChairUB_idle1),
QGVAR(HubSittingChairUB_idle2),
QGVAR(HubSittingChairUB_idle3),
QGVAR(HubSittingChairUB_move1),
QGVAR(HubSittingChairUC_idle1),
QGVAR(HubSittingChairUC_idle2),
QGVAR(HubSittingChairUC_idle3),
QGVAR(HubSittingChairUC_move1)
];
};
// Select random animation from Animations Pool
selectRandom [
QGVAR(HubSittingChairA_idle1),
QGVAR(HubSittingChairA_idle2),
QGVAR(HubSittingChairA_idle3),
QGVAR(HubSittingChairA_move1),
QGVAR(HubSittingChairB_idle1),
QGVAR(HubSittingChairB_idle2),
QGVAR(HubSittingChairB_idle3),
QGVAR(HubSittingChairB_move1),
QGVAR(HubSittingChairC_idle1),
QGVAR(HubSittingChairC_idle2),
QGVAR(HubSittingChairC_idle3),
QGVAR(HubSittingChairC_move1),
QGVAR(HubSittingChairUA_idle1),
QGVAR(HubSittingChairUA_idle2),
QGVAR(HubSittingChairUA_idle3),
QGVAR(HubSittingChairUA_move1),
QGVAR(HubSittingChairUB_idle1),
QGVAR(HubSittingChairUB_idle2),
QGVAR(HubSittingChairUB_idle3),
QGVAR(HubSittingChairUB_move1),
QGVAR(HubSittingChairUC_idle1),
QGVAR(HubSittingChairUC_idle2),
QGVAR(HubSittingChairUC_idle3),
QGVAR(HubSittingChairUC_move1)
]
selectRandom _animations

View File

@ -48,7 +48,7 @@ if (_multiSitting) then {
};
// Get random animation and perform it (before moving player to ensure correct placement)
[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations
[_player, [_seat] call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations
[_player, "", 1] call EFUNC(common,doAnimation); // Correctly applies animation's config values (such as disallow throwing of grenades, intercept keybinds... etc).
TRACE_2("Sit pos and dir",_sitPosition,_sitDirection);

View File

@ -132,6 +132,9 @@ if (_init) then {
GVAR(camDummy) = nil;
// Stop tracking everything
{ deleteVehicle _x; } forEach GVAR(camLights);
GVAR(camLights) = nil;
GVAR(camMode) = nil;
GVAR(camVision) = nil;
GVAR(camFocus) = nil;
@ -144,6 +147,5 @@ if (_init) then {
GVAR(camYaw) = nil;
GVAR(camPitch) = nil;
GVAR(camSlow) = nil;
GVAR(camLights) = nil;
GVAR(camLight) = nil;
};

View File

@ -240,6 +240,7 @@ ACE_plasmaIV_250 | Plasma IV (250ml) | ACE_ItemCore |
ACE_salineIV | Saline IV (1000ml) | ACE_ItemCore |
ACE_salineIV_500 | Saline IV (500ml) | ACE_ItemCore |
ACE_salineIV_250 | Saline IV (250ml) | ACE_ItemCore |
ACE_suture | Suture | ACE_ItemCore |
ACE_surgicalKit | Surgical Kit | ACE_ItemCore |
ACE_tourniquet | Tourniquet (CAT) | ACE_ItemCore |
ACE_medicalSupplyCrate | Simple ACE Medical Supply Crate | ammo box |

View File

@ -29,6 +29,7 @@ class CfgVehicles {
acex_sitting_sitDirection = 180; // Direction relative to object
acex_sitting_sitPosition[] = {0, -0.1, -0.45}; // Position relative to object (may behave weird with certain objects)
acex_sitting_interactPosition[] = {0, -0.1, -0.45};
ace_sitting_animations[] = {"ace_sitting_HubSittingChairA_idle1"}; // Overwrite random animation pool
XEH_ENABLED; // Enable XEH (only necessary if XEH is not yet enabled for this class or the one this inherits from)
};
};