Reverted changes for hostile crew (now in a separate PR)

This commit is contained in:
johnb432 2024-08-10 14:57:36 +02:00
parent 6656aa624c
commit 71dcfb512c
4 changed files with 6 additions and 8 deletions

View File

@ -32,8 +32,7 @@ private _condition = {
params ["_target", "_player", "_args"]; params ["_target", "_player", "_args"];
_args params ["_carryMag", "_turretPath", "", "_magSource"]; _args params ["_carryMag", "_turretPath", "", "_magSource"];
[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew) && ([_target, _turretPath, _carryMag, _magSource] call FUNC(reload_canLoadMagazine)) select 0
{([_target, _turretPath, _carryMag, _magSource] call FUNC(reload_canLoadMagazine)) select 0}
}; };
private _cfgMagazines = configFile >> "CfgMagazines"; // Micro-optimization private _cfgMagazines = configFile >> "CfgMagazines"; // Micro-optimization

View File

@ -43,8 +43,7 @@ private _condition = {
params ["_target", "_player", "_args"]; params ["_target", "_player", "_args"];
_args params ["_vehMag", "_turretPath", "_carryMag"]; _args params ["_vehMag", "_turretPath", "_carryMag"];
[_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew) && [_target, _turretPath, _player, _carryMag, _vehMag] call FUNC(reload_canUnloadMagazine)
{[_target, _turretPath, _player, _carryMag, _vehMag] call FUNC(reload_canUnloadMagazine)}
}; };
private _actions = []; private _actions = [];

View File

@ -11,7 +11,7 @@
* Unit can interact with vehicle crew <BOOL> * Unit can interact with vehicle crew <BOOL>
* *
* Example: * Example:
* [player, cursorObject] call ace_interaction_fnc_canInteractWithVehicleCrew * [cursorObject, player] call ace_interaction_fnc_canInteractWithVehicleCrew
* *
* Public: No * Public: No
*/ */

View File

@ -11,17 +11,17 @@
* Can check ammo <BOOL> * Can check ammo <BOOL>
* *
* Example: * Example:
* [cursorObject, player] call ace_reload_fnc_canCheckAmmo * [cursorObject] call ace_reload_fnc_canCheckAmmo
* *
* Public: No * Public: No
*/ */
params ["_target", "_player"]; params ["_target"];
// Static weapons // Static weapons
if (_target isKindOf "StaticWeapon") exitWith { if (_target isKindOf "StaticWeapon") exitWith {
// No check ammo action on destroyed static weapons // No check ammo action on destroyed static weapons
if (!alive _target || {!([_player, _target] call EFUNC(interaction,canInteractWithVehicleCrew))}) exitWith {false}; if (!alive _target) exitWith {false};
if (currentMagazine _target != "") exitWith {true}; if (currentMagazine _target != "") exitWith {true};