mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e11e102a76
* Enable majority of actions underwater * Remove log * Add logistics_wirecutter support (don't play kneel animations underwater - looks silly) * Don't perform kneel animations when repairing or medicaling underwater * Fix interaction menu rendering underwater (was moving based on player eye level due to height max used for large vehicles) * Fix attach underwater (LIW does not work underwater, LIS does), Add attach scan drawing define * Remove left-over systemChat * Remove vehiclelock from Plane, Disallow linking belt underwater, Allow checking ammo when sitting via action (was already possible via keybind), Use param for LIS
37 lines
1001 B
Plaintext
37 lines
1001 B
Plaintext
/*
|
|
* Author: Jonpas
|
|
* Checks if a throwable can be prepared.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
* 1: Ignore Last Thrown Time <BOOL> (default: false)
|
|
*
|
|
* Return Value:
|
|
* Can Prepare <BOOL>
|
|
*
|
|
* Example:
|
|
* [unit] call ace_advanced_throwing_fnc_canPrepare
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_unit", ["_ignoreLastThrownTime", false]];
|
|
|
|
// Don't delay when picking up
|
|
if (_ignoreLastThrownTime) then {
|
|
_unit setVariable [QGVAR(lastThrownTime), -1];
|
|
};
|
|
|
|
GVAR(enabled) &&
|
|
|
|
#ifdef ALLOW_QUICK_THROW
|
|
{true} &&
|
|
#else
|
|
{_unit getVariable [QGVAR(lastThrownTime), CBA_missionTime - 3] < CBA_missionTime - 2} && // Prevent throwing in quick succession
|
|
#endif
|
|
|
|
{!(call EFUNC(common,isFeatureCameraActive))} &&
|
|
{[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw
|
|
{_unit call CBA_fnc_canUseWeapon} // Disable in non-FFV seats due to surface detection issues
|