fixes, tweaks

This commit is contained in:
commy2 2016-10-13 20:17:21 +02:00
parent bc4c1787f9
commit f2dfc6dc0e
3 changed files with 9 additions and 8 deletions

View File

@ -18,11 +18,8 @@
params ["_unit", ["_reason", "unknown"]]; params ["_unit", ["_reason", "unknown"]];
// kill // wait a frame to escape handleDamage
_unit setDamage 1; [EFUNC(medical_engine,setStructuralDamage), [_unit, 1]] call CBA_fnc_execNextFrame;
// reset textures
[_unit, "All"] call EFUNC(medical_engine,updateBodyPartVisuals);
private _lastShooter = _unit getVariable [QEGVAR(medical_engine,lastShooter), objNull]; private _lastShooter = _unit getVariable [QEGVAR(medical_engine,lastShooter), objNull];
private _lastInstigator = _unit getVariable [QEGVAR(medical_engine,lastInstigator), objNull]; private _lastInstigator = _unit getVariable [QEGVAR(medical_engine,lastInstigator), objNull];

View File

@ -28,11 +28,13 @@ if (!local _unit) exitWith {
ERROR("Unit not local or null"); ERROR("Unit not local or null");
}; };
if !(_unit call EFUNC(common,isAwake)) exitWith {};
private _timeOut = [TIME_OUT_HIT, TIME_OUT_MOAN] select (_type == "moan"); private _timeOut = [TIME_OUT_HIT, TIME_OUT_MOAN] select (_type == "moan");
// Handle timeout // Handle timeout
if (_unit getVariable [QGVAR(soundTimeout), -1] > CBA_missionTime) exitWith {}; if (_unit getVariable [QGVAR(soundTimeout) + _type, -1] > CBA_missionTime) exitWith {};
_unit setVariable [QGVAR(soundTimeout), CBA_missionTime + _timeOut]; _unit setVariable [QGVAR(soundTimeout) + _type, CBA_missionTime + _timeOut];
// Get sounds // Get sounds
private _soundsNamespace = NAMESPACE_NULL; private _soundsNamespace = NAMESPACE_NULL;

View File

@ -104,8 +104,10 @@ if (weaponLowered _caller) then {
_animDuration = _animDuration + 0.5; _animDuration = _animDuration + 0.5;
// fix problems with lowered weapon transitions by raising the weapon first // fix problems with lowered weapon transitions by raising the weapon first
if (currentWeapon _caller != "" && {_callerAnim != ""}) then {
_caller action ["WeaponInHand", _caller]; _caller action ["WeaponInHand", _caller];
}; };
};
if (binocular _caller != "" && {binocular _caller == currentWeapon _caller}) then { if (binocular _caller != "" && {binocular _caller == currentWeapon _caller}) then {
_animDuration = _animDuration + 1.0; _animDuration = _animDuration + 1.0;