Switched to canInteractConditions

This commit is contained in:
Glowbal 2015-03-22 20:59:57 +01:00
parent 7bc6fa3c3b
commit 4995016a66
4 changed files with 9 additions and 4 deletions

View File

@ -37,7 +37,7 @@ if (GVAR(keyDown)) then {
_numInteractions = 0;
// Prevent interacting with yourself or your own vehicle
if (_target != ACE_player && {_target != vehicle ACE_player} && {_target getvariable [QEGVAR(interaction,enabled), true]}) then {
if (_target != ACE_player && {_target != vehicle ACE_player}) then {
// Iterate through object actions, find base level actions and render them if appropiate
_actionsVarName = format [QGVAR(Act_%1), typeOf _target];

View File

@ -15,6 +15,9 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
["carryObjectDropped", FUNC(onCarryObjectDropped)] call ace_common_fnc_addEventHandler;
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call ace_common_fnc_addEventHandler;
[QGVAR(disableInteraction), {!((_this select 1) getVariable [QGVAR(disableInteraction), false])}] call EFUNC(common,addCanInteractWithCondition);
// Initialize all effects
_fnc_createEffect = {
private ["_type", "_layer", "_default"];

View File

@ -73,10 +73,11 @@ if (isMultiplayer) then {
};
_newUnit setvariable [QGVAR(copyOfUnit), _oldBody, true];
_oldBody setvariable [QGVAR(hasCopy), _newUnit, true];
_newUnit setvariable ["ACE_isDead", true, true];
_newUnit setvariable ["ACE_isUnconscious", true, true];
_newUnit setvariable [QEGVAR(interaction,enabled), false, true];
_oldBody setvariable [QEGVAR(interaction,enabled), false, true];
_newUnit setvariable [QGVAR(disableInteraction), true, true];
_oldBody setvariable [QGVAR(disableInteraction), true, true];
_newUnit setDamage 0.89;
_newUnit;

View File

@ -29,7 +29,8 @@ if (_carrying >= 0) then {
};
detach _copy;
deleteVehicle _copy;
_target setvariable [QEGVAR(interaction,enabled), nil, true];
_target setvariable [QGVAR(disableInteraction), nil, true];
_target setvariable [QGVAR(hasCopy), nil, true];
};
_caller setvariable [QGVAR(isCarrying), -1, true];