mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Updated parameterization in Captives module.
This commit is contained in:
parent
275b0c4300
commit
24dd320c3c
@ -16,8 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
params ["_unit", "_target"];
|
||||
//Check sides, Player has cableTie, target is alive and not already handcuffed
|
||||
|
||||
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
|
||||
|
@ -16,8 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
params ["_unit", "_target"];
|
||||
//Alive, handcuffed, not being escored, and not unconscious
|
||||
|
||||
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
params ["_unit", "_target"];
|
||||
|
||||
_target getVariable [QGVAR(isHandcuffed), false]
|
||||
|| {_target getVariable [QGVAR(isSurrendering), false]}
|
||||
|
@ -18,8 +18,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_objects"];
|
||||
|
||||
PARAMS_3(_unit,_target,_vehicle);
|
||||
params ["_unit", "_target","_vehicle"];
|
||||
|
||||
if (isNull _target) then {
|
||||
_objects = attachedObjects _unit;
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
params ["_unit", "_target"];
|
||||
|
||||
//Unit is handcuffed and not currently being escorted
|
||||
_target getVariable [QGVAR(isHandcuffed), false] &&
|
||||
|
@ -16,8 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
DEFAULT_PARAM(1,_target,objNull);
|
||||
params ["_unit", ["_target", objNull]];
|
||||
|
||||
if (isNull _target) then {
|
||||
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
||||
|
@ -16,12 +16,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_newSurrenderState);
|
||||
|
||||
private "_returnValue";
|
||||
|
||||
params ["_unit", "_newSurrenderState"];
|
||||
|
||||
_returnValue = if (_newSurrenderState) then {
|
||||
//no weapon equiped AND not currently surrendering and
|
||||
//no weapon equiped AND not currently surrendering and
|
||||
GVAR(allowSurrender) && {(currentWeapon _unit) == ""} && {!(_unit getVariable [QGVAR(isSurrendering), false])}
|
||||
} else {
|
||||
//is Surrendering
|
||||
|
@ -18,6 +18,6 @@
|
||||
|
||||
private ["_cargo"];
|
||||
|
||||
PARAMS_2(_player,_unit);
|
||||
params ["_player", "_unit"];
|
||||
|
||||
((vehicle _unit) != _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}
|
||||
|
@ -16,10 +16,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
|
||||
_unit removeItem "ACE_CableTie";
|
||||
params ["_unit", "_target"];
|
||||
|
||||
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
||||
|
||||
["SetHandcuffed", [_target], [_target, true]] call EFUNC(common,targetEvent);
|
||||
|
||||
_unit removeItem "ACE_CableTie";
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_unit,_target,_state);
|
||||
params ["_unit", "_target","_state"];
|
||||
|
||||
if (_state) then {
|
||||
if (_unit getVariable [QGVAR(isEscorting), false]) exitWith {};
|
||||
|
@ -19,6 +19,7 @@
|
||||
private ["_weapon", "_listedItemClasses", "_actions", "_allGear"];
|
||||
|
||||
PARAMS_2(_player,_unit);
|
||||
params ["_player", "_unit"];
|
||||
|
||||
_weapon = currentWeapon _player;
|
||||
if (_weapon == primaryWeapon _player && {_weapon != ""}) then {
|
||||
|
@ -17,9 +17,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_unit,_target,_vehicle);
|
||||
private "_objects";
|
||||
|
||||
params ["_unit", "_target","_vehicle"];
|
||||
|
||||
if (isNull _target) then {
|
||||
_objects = attachedObjects _unit;
|
||||
_objects = [_objects, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
|
||||
|
@ -15,6 +15,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
params ["_unit", "_target"];
|
||||
|
||||
["SetHandcuffed", [_target], [_target, false]] call EFUNC(common,targetEvent);
|
||||
|
@ -16,6 +16,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_target);
|
||||
params ["_unit", "_target"];
|
||||
|
||||
["MoveOutCaptive", [_target], [_target]] call EFUNC(common,targetEvent);
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
||||
params ["_vehicle", "_dontcare","_unit"];
|
||||
|
||||
if (local _unit) then {
|
||||
if (_unit getVariable [QGVAR(isEscorting), false]) then {
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
||||
params ["_vehicle", "_dontcare","_unit"];
|
||||
|
||||
if ((local _unit) && {_unit getVariable [QGVAR(isHandcuffed), false]}) then {
|
||||
private ["_cargoIndex"];
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_oldUnit);
|
||||
params ["_oldUnit"];
|
||||
|
||||
if (!local _oldUnit) exitWith {};
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_unit,_isUnconc);
|
||||
params ["_unit","_isUnconc"];
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_newUnit,_oldUnit);
|
||||
params ["_newUnit","_oldUnit"];
|
||||
|
||||
//set showHUD based on new unit status:
|
||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_dead);
|
||||
params ["_unit","_dead"];
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
params ["_unit"];
|
||||
|
||||
// prevent players from throwing grenades (added to all units)
|
||||
[_unit, "Throw", {((_this select 1) getVariable [QGVAR(isHandcuffed), false]) || {(_this select 1) getVariable [QGVAR(isSurrendering), false]}}, {}] call EFUNC(common,addActionEventhandler);
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_zeusIsOpen);
|
||||
params ["_unit","_zeusIsOpen"];
|
||||
|
||||
//set showHUD based on unit status:
|
||||
if (!_zeusIsOpen) then {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_logic);
|
||||
parmas ["_logic"];
|
||||
|
||||
[_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(allowSurrender), "allowSurrender"] call EFUNC(common,readSettingFromModule);
|
||||
|
@ -17,9 +17,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_3(_logic,_units,_activated);
|
||||
private ["_bisMouseOver", "_mouseOverObject"];
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if (!_activated) exitWith {};
|
||||
|
||||
if (local _logic) then {
|
||||
|
@ -16,8 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_state);
|
||||
|
||||
params ["_unit","_state"];
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
ERROR("running setHandcuffed on remote unit");
|
||||
@ -43,7 +42,7 @@ if (_state) then {
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
[{
|
||||
PARAMS_1(_unit);
|
||||
params ["_unit"];
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -16,8 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_state);
|
||||
|
||||
params ["_unit","_state"];
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
ERROR("running surrender on remote unit");
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_target,_vehicle);
|
||||
|
||||
private ["_cargoIndex"];
|
||||
|
||||
params ["_target","_vehicle"];
|
||||
|
||||
_target moveInCargo _vehicle;
|
||||
_target assignAsCargo _vehicle;
|
||||
_cargoIndex = _vehicle getCargoIndex _target;
|
||||
|
@ -15,8 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
params ["_unit"];
|
||||
_unit setVariable [QGVAR(CargoIndex), -1, true];
|
||||
|
||||
moveOut _unit;
|
||||
|
Loading…
Reference in New Issue
Block a user