mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
params for public functions
This commit is contained in:
parent
78a8149cc2
commit
81f87ee13c
@ -177,7 +177,7 @@ switch (toLower _mode) do {
|
||||
} else {
|
||||
GVAR(camZoom) = (GVAR(camZoom) - (_zChange * GVAR(camZoom) * 0.2)) max 0.1;
|
||||
};
|
||||
call FUNC(handleCamera);
|
||||
[] call FUNC(handleCamera);
|
||||
};
|
||||
case "onmousemoving": {
|
||||
private ["_x","_y"];
|
||||
@ -185,7 +185,7 @@ switch (toLower _mode) do {
|
||||
_y = _args select 2;
|
||||
|
||||
GVAR(mousePos) = [_x,_y];
|
||||
call FUNC(handleMouse);
|
||||
[] call FUNC(handleMouse);
|
||||
};
|
||||
// Keyboard events
|
||||
case "onkeydown": {
|
||||
|
@ -20,3 +20,6 @@ _killer = _this select 1;
|
||||
|
||||
// Remove from group to prevent appearing on HUD upon respawn
|
||||
[_unit, true, QGVAR(isSpectator), side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
|
||||
GVAR(camUnit) = _killer;
|
||||
GVAR(camMode) = 2;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: SilentSpike
|
||||
* Start the spectator camera spectator on respawn
|
||||
* Start the interface on respawn
|
||||
*
|
||||
* Arguments:
|
||||
* 0: New unit <OBJECT>
|
||||
|
@ -18,10 +18,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit","_set","_target"];
|
||||
_unit = _this select 0;
|
||||
_set = if (count _this > 1) then {_this select 1} else {true};
|
||||
_target = if (count _this > 2) then {_this select 2} else {objNull};
|
||||
params ["_unit",["_set",true,[true]],["_target",objNull,[objNull]]];
|
||||
|
||||
// No change, no service (but allow spectators who respawn to be reset)
|
||||
if !(_set || (_unit getVariable [QGVAR(isSpectator), false])) exitWith {};
|
||||
@ -47,10 +44,9 @@ if (_set) then {
|
||||
[_unit, QGVAR(isSpectator)] call EFUNC(common,hideUnit);
|
||||
[_unit, QGVAR(isSpectator)] call EFUNC(common,muteUnit);
|
||||
|
||||
if !(GVAR(modulePos)) then {
|
||||
if !(isNull _target) then {
|
||||
GVAR(camPos) = getPosATL _target;
|
||||
};
|
||||
if !(isNull _target) then {
|
||||
GVAR(camPos) = getPosASL _target;
|
||||
GVAR(camUnit) = _target;
|
||||
};
|
||||
|
||||
["open"] call FUNC(handleInterface);
|
||||
|
@ -18,9 +18,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_newUnits = _this select 0;
|
||||
_append = if (count _this > 1) then {_this select 1} else {true};
|
||||
_permanent = if (count _this > 2) then {_this select 2} else {false};
|
||||
params [["_newUnits",[]],["_append",true,[true]],["_permanent",false,[false]]];
|
||||
|
||||
if (_permanent) then {
|
||||
if (_append) then {
|
||||
|
Loading…
Reference in New Issue
Block a user