synch anim speed acceleration

This commit is contained in:
commy2 2016-09-30 10:38:27 +02:00
parent 03e24d8fd9
commit 96a1e74c85
4 changed files with 7 additions and 3 deletions

View File

@ -35,6 +35,10 @@
TRACE_2("blockSprint EH",_object,_set);
_object allowSprint (_set == 0);
}] call CBA_fnc_addEventHandler;
[QGVAR(setAnimSpeedCoef), {
params ["_object", "_set"];
_object setAnimSpeedCoef _set;
}] call CBA_fnc_addEventHandler;
[QGVAR(setCaptive), {
params ["_object", "_set"];
TRACE_2("setCaptive EH",_object,_set);

View File

@ -156,7 +156,7 @@ TRACE_1("",_treatmentTime);
// speed up animation depending on treatment time
if (!isNil "_animDuration") then {
_caller setAnimSpeedCoef (_animDuration / _treatmentTime);
[QGVAR(setAnimSpeedCoef), [_caller, _animDuration / _treatmentTime]] call CBA_fnc_globalEvent;
TRACE_2("",_animDuration,_treatmentTime);
};

View File

@ -31,7 +31,7 @@ if (!isNil "_endInAnim") then {
};
// reset sped up animations
_caller setAnimSpeedCoef 1;
[QGVAR(setAnimSpeedCoef), [_caller, 1]] call CBA_fnc_globalEvent;
{
_x params ["_unit", "_item"];

View File

@ -31,7 +31,7 @@ if (!isNil "_endInAnim") then {
};
// reset sped up animations
_caller setAnimSpeedCoef 1;
[QGVAR(setAnimSpeedCoef), [_caller, 1]] call CBA_fnc_globalEvent;
// Record specific callback
private _config = configFile >> QGVAR(Actions) >> CUR_LEVEL >> _className;