mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of github.com:KoffeinFlummi/ACE3 into spanishTranslation3.5.0
This commit is contained in:
commit
2fc27c553f
@ -4,6 +4,7 @@ PREP(canRearm);
|
||||
PREP(canStoreAmmo);
|
||||
PREP(canTakeAmmo);
|
||||
PREP(createDummy);
|
||||
PREP(disable);
|
||||
PREP(dropAmmo);
|
||||
PREP(getConfigMagazines);
|
||||
PREP(getMaxMagazines);
|
||||
|
21
addons/rearm/functions/fnc_disable.sqf
Normal file
21
addons/rearm/functions/fnc_disable.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Author: GitHawk
|
||||
* Disables rearm for a vehicle.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Disable <BOOL><OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [tank] call ace_rearm_fnc_disable
|
||||
* [tank, false] call ace_rearm_fnc_disable
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_target", objNull, [objNull]], ["_disable", true, [true]]];
|
||||
_target setVariable [QGVAR(disabled), _disable, true];
|
@ -60,7 +60,7 @@ while {(_closeInMax - _closeInMin) > 0.01} do {
|
||||
_closeInDistance = (_closeInMax + _closeInMin) / 2;
|
||||
|
||||
//Checks (too close to center or can't attach)
|
||||
if (((_startDistanceFromCenter - _closeInDistance) < 0.1) || {!([_target, _unit, _itemClassname] call FUNC(canAttach))}) exitWith {
|
||||
if ((_startDistanceFromCenter - _closeInDistance) < 0.1) exitWith {
|
||||
TRACE_2("no valid spot found",_closeInDistance,_startDistanceFromCenter);
|
||||
[localize LSTRING(Failed)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Example:
|
||||
* [can] call ace_refuel_fnc_makeJerryCan
|
||||
*
|
||||
* Public: No
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Example:
|
||||
* [truck] call ace_refuel_fnc_reset
|
||||
*
|
||||
* Public: No
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user