mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#2045 - Push SDV sub, cleanup push
This commit is contained in:
parent
e5eaefafdb
commit
4cce799ace
@ -501,8 +501,8 @@ class CfgVehicles {
|
||||
class ACE_Push {
|
||||
displayName = CSTRING(Push);
|
||||
distance = 6;
|
||||
condition = QUOTE(getMass _target < 1000 && {alive _target});
|
||||
statement = QUOTE([ARR_2(_target, [ARR_3(2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5)])] call DFUNC(push););
|
||||
condition = QUOTE(((getMass _target) <= 2600) && {alive _target} && {(vectorMagnitude (velocity _target)) < 3});
|
||||
statement = QUOTE(_this call FUNC(push));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
|
@ -10,6 +10,13 @@ ACE_Modifier = 0;
|
||||
_group selectLeader _leader;
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//Pushing boats from FUNC(push)
|
||||
[QGVAR(pushBoat), {
|
||||
params ["_boat", "_newVelocity"];
|
||||
_boat setVelocity _newVelocity;
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(isOpeningDoor) = false;
|
||||
|
@ -4,23 +4,23 @@
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Boat <OBJECT>
|
||||
* 1: Velocity <ARRAY>
|
||||
* 1: Player <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [target, [vector]] call ace_interaction_fnc_push
|
||||
* [Boats, Jose] call ace_interaction_fnc_push
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_boat,_velocity);
|
||||
params ["_boat", "_player"];
|
||||
|
||||
if !(local _boat) exitWith {
|
||||
[_this, QUOTE(FUNC(push)), _boat] call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
private ["_newVelocity"];
|
||||
|
||||
_boat setVelocity _velocity;
|
||||
_newVelocity = [2 * (vectorDir _player select 0), 2 * (vectorDir _player select 1), 0.5];
|
||||
|
||||
[QGVAR(pushBoat), [_boat], [_boat, _newVelocity]] call EFUNC(common,targetEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user