mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
adjust functions to new syntax
This commit is contained in:
parent
dea830441b
commit
97ae218288
@ -69,7 +69,7 @@ switch (_position) do {
|
|||||||
|
|
||||||
case "gunner" : {
|
case "gunner" : {
|
||||||
private "_turretConfig";
|
private "_turretConfig";
|
||||||
_turret = [typeOf _vehicle] call FUNC(getTurretGunner);
|
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||||
if (_turret isEqualTo []) exitWith {false};
|
if (_turret isEqualTo []) exitWith {false};
|
||||||
|
|
||||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||||
@ -82,7 +82,7 @@ switch (_position) do {
|
|||||||
|
|
||||||
case "commander" : {
|
case "commander" : {
|
||||||
private "_turretConfig";
|
private "_turretConfig";
|
||||||
_turret = [typeOf _vehicle] call FUNC(getTurretCommander);
|
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||||
if (_turret isEqualTo []) exitWith {false};
|
if (_turret isEqualTo []) exitWith {false};
|
||||||
|
|
||||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||||
@ -95,7 +95,7 @@ switch (_position) do {
|
|||||||
|
|
||||||
case "copilot" : {
|
case "copilot" : {
|
||||||
private "_turretConfig";
|
private "_turretConfig";
|
||||||
_turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
|
_turret = [_vehicle] call FUNC(getTurretCopilot);
|
||||||
if (_turret isEqualTo []) exitWith {false};
|
if (_turret isEqualTo []) exitWith {false};
|
||||||
|
|
||||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||||
@ -108,7 +108,7 @@ switch (_position) do {
|
|||||||
|
|
||||||
case "turret" : {
|
case "turret" : {
|
||||||
private ["_turrets", "_turretConfig"];
|
private ["_turrets", "_turretConfig"];
|
||||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
|
_turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||||
|
|
||||||
if (_index != -1 && {_turret = _turrets select _index;
|
if (_index != -1 && {_turret = _turrets select _index;
|
||||||
CANGETINTURRETINDEX
|
CANGETINTURRETINDEX
|
||||||
@ -136,7 +136,7 @@ switch (_position) do {
|
|||||||
|
|
||||||
case "ffv" : {
|
case "ffv" : {
|
||||||
private ["_turrets", "_turretConfig"];
|
private ["_turrets", "_turretConfig"];
|
||||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
|
_turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||||
|
|
||||||
if (_index != -1 && {_turret = _turrets select _index;
|
if (_index != -1 && {_turret = _turrets select _index;
|
||||||
CANGETINTURRETINDEX
|
CANGETINTURRETINDEX
|
||||||
|
@ -64,7 +64,7 @@ switch (_position) do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
case "gunner" : {
|
case "gunner" : {
|
||||||
_turret = [typeOf _vehicle] call FUNC(getTurretGunner);
|
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||||
|
|
||||||
if (CANGETINTURRETINDEX) then {
|
if (CANGETINTURRETINDEX) then {
|
||||||
_script = [
|
_script = [
|
||||||
@ -75,7 +75,7 @@ switch (_position) do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
case "commander" : {
|
case "commander" : {
|
||||||
_turret = [typeOf _vehicle] call FUNC(getTurretCommander);
|
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||||
|
|
||||||
if (CANGETINTURRETINDEX) then {
|
if (CANGETINTURRETINDEX) then {
|
||||||
_script = [
|
_script = [
|
||||||
@ -86,7 +86,7 @@ switch (_position) do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
case "copilot" : {
|
case "copilot" : {
|
||||||
_turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
|
_turret = [_vehicle] call FUNC(getTurretCopilot);
|
||||||
|
|
||||||
if (CANGETINTURRETINDEX) then {
|
if (CANGETINTURRETINDEX) then {
|
||||||
_script = [
|
_script = [
|
||||||
@ -100,7 +100,7 @@ switch (_position) do {
|
|||||||
|
|
||||||
case "turret" : {
|
case "turret" : {
|
||||||
private "_turrets";
|
private "_turrets";
|
||||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
|
_turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||||
|
|
||||||
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
|
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
|
||||||
_script = [
|
_script = [
|
||||||
@ -127,7 +127,7 @@ switch (_position) do {
|
|||||||
|
|
||||||
case "ffv" : {
|
case "ffv" : {
|
||||||
private "_turrets";
|
private "_turrets";
|
||||||
_turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
|
_turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||||
|
|
||||||
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
|
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
|
||||||
_script = [
|
_script = [
|
||||||
|
@ -30,7 +30,7 @@ if (_distance == 0) then {
|
|||||||
|
|
||||||
_weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets
|
_weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets
|
||||||
|
|
||||||
if (_turret isEqualTo ([typeOf _vehicle] call EFUNC(common,getTurretCommander))) then {
|
if (_turret isEqualTo ([_vehicle] call EFUNC(common,getTurretCommander))) then {
|
||||||
_weaponDirection = eyeDirection _vehicle;
|
_weaponDirection = eyeDirection _vehicle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ private ["_weaponDirection", "_angleTarget"];
|
|||||||
|
|
||||||
_weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets
|
_weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets
|
||||||
|
|
||||||
if (_turret isEqualTo ([typeOf _vehicle] call EFUNC(common,getTurretCommander))) then {
|
if (_turret isEqualTo ([_vehicle] call EFUNC(common,getTurretCommander))) then {
|
||||||
_weaponDirection = eyeDirection _vehicle;
|
_weaponDirection = eyeDirection _vehicle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ private ["_vehicle", "_turret", "_weapons"];
|
|||||||
|
|
||||||
_vehicle = _this select 0;
|
_vehicle = _this select 0;
|
||||||
|
|
||||||
_turret = [typeOf _vehicle] call EFUNC(common,getTurretCommander);
|
_turret = [_vehicle] call EFUNC(common,getTurretCommander);
|
||||||
|
|
||||||
_weapons = _vehicle weaponsTurret _turret;
|
_weapons = _vehicle weaponsTurret _turret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user