Disable interaction for objects

This commit is contained in:
Glowbal 2015-03-22 20:39:22 +01:00
parent 6eac193825
commit 7bc6fa3c3b
3 changed files with 5 additions and 1 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}) then {
if (_target != ACE_player && {_target != vehicle ACE_player} && {_target getvariable [QEGVAR(interaction,enabled), true]}) then {
// Iterate through object actions, find base level actions and render them if appropiate
_actionsVarName = format [QGVAR(Act_%1), typeOf _target];

View File

@ -75,5 +75,8 @@ if (isMultiplayer) then {
_newUnit setvariable [QGVAR(copyOfUnit), _oldBody, 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 setDamage 0.89;
_newUnit;

View File

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