mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Prevent switch from pilot to gunner seats on DZE helicopters
This is a fairly known issue. One player can fly a uh1y and switch between gunners seats and pilot seat. This makes a seconds player to fly with obsolete. This commit fixes that issue. Pilots can no longer switch to the gunner seats but the gunners have the option to switch to the pilot seats if it is needed. DZ helicopters remain unchanged.
This commit is contained in:
@@ -113,10 +113,12 @@ class AW159_Lynx_BAF_DZ: AW159_Lynx_BAF {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class AW159_Lynx_BAF_DZE: AW159_Lynx_BAF_DZ {
|
class AW159_Lynx_BAF_DZE: AW159_Lynx_BAF_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets: Turrets
|
class Turrets: Turrets
|
||||||
{
|
{
|
||||||
class MainTurret: MainTurret
|
class MainTurret: MainTurret
|
||||||
{
|
{
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class CH_47F_EP1_DZ : CH_47F_EP1 {
|
|||||||
|
|
||||||
class CH_47F_EP1_DZE: CH_47F_EP1_DZ
|
class CH_47F_EP1_DZE: CH_47F_EP1_DZ
|
||||||
{
|
{
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets: Turrets
|
class Turrets: Turrets
|
||||||
{
|
{
|
||||||
class MainTurret: MainTurret
|
class MainTurret: MainTurret
|
||||||
@@ -64,7 +65,7 @@ class CH_47F_EP1_DZE: CH_47F_EP1_DZ
|
|||||||
minFov = 0.25;
|
minFov = 0.25;
|
||||||
maxFov = 1.1;
|
maxFov = 1.1;
|
||||||
};
|
};
|
||||||
gunnerCompartments = "Compartment1";
|
gunnerCompartments = "Compartment3";
|
||||||
memoryPointsGetInGunner = "pos gunner";
|
memoryPointsGetInGunner = "pos gunner";
|
||||||
memoryPointsGetInGunnerDir = "pos gunner dir";
|
memoryPointsGetInGunnerDir = "pos gunner dir";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -126,10 +126,12 @@ class Ka60_GL_PMC_DZ: Ka60_GL_PMC {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Ka60_GL_PMC_DZE: Ka60_GL_PMC_DZ {
|
class Ka60_GL_PMC_DZE: Ka60_GL_PMC_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets: Turrets
|
class Turrets: Turrets
|
||||||
{
|
{
|
||||||
class MainTurret: MainTurret
|
class MainTurret: MainTurret
|
||||||
{
|
{
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -39,11 +39,14 @@ class Mi17_DZ: Mi17_base {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Mi17_DZE: Mi17_DZ {
|
class Mi17_DZE: Mi17_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class MainTurret : MainTurret {
|
class MainTurret : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
class BackTurret : BackTurret {
|
class BackTurret : BackTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -113,12 +116,15 @@ class Mi17_TK_EP1_DZ: Mi17_base {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Mi17_TK_EP1_DZE: Mi17_TK_EP1_DZ {
|
class Mi17_TK_EP1_DZE: Mi17_TK_EP1_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class MainTurret : MainTurret {
|
class MainTurret : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
class BackTurret : BackTurret {
|
class BackTurret : BackTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -188,12 +194,15 @@ class Mi17_UN_CDF_EP1_DZ: Mi17_base {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Mi17_UN_CDF_EP1_DZE: Mi17_UN_CDF_EP1_DZ {
|
class Mi17_UN_CDF_EP1_DZE: Mi17_UN_CDF_EP1_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class MainTurret : MainTurret {
|
class MainTurret : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
class BackTurret : BackTurret {
|
class BackTurret : BackTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -264,11 +273,14 @@ class Mi17_CDF_DZ: Mi17_base {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
class Mi17_CDF_DZE: Mi17_CDF_DZ {
|
class Mi17_CDF_DZE: Mi17_CDF_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class MainTurret : MainTurret {
|
class MainTurret : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
class BackTurret : BackTurret {
|
class BackTurret : BackTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -469,8 +481,10 @@ class Mi171Sh_CZ_EP1_DZ: Mi17_base {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Mi171Sh_CZ_EP1_DZE: Mi171Sh_CZ_EP1_DZ {
|
class Mi171Sh_CZ_EP1_DZE: Mi171Sh_CZ_EP1_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class LeftTurret : MainTurret {
|
class LeftTurret : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
proxyIndex = 2;
|
proxyIndex = 2;
|
||||||
commanding = -1;
|
commanding = -1;
|
||||||
primaryGunner = 0;
|
primaryGunner = 0;
|
||||||
@@ -484,6 +498,7 @@ class Mi171Sh_CZ_EP1_DZE: Mi171Sh_CZ_EP1_DZ {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class BackTurret : BackTurret {
|
class BackTurret : BackTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
gunnerName = $STR_POSITION_REARGUNNER;
|
gunnerName = $STR_POSITION_REARGUNNER;
|
||||||
primaryGunner = 1;
|
primaryGunner = 1;
|
||||||
commanding = -3;
|
commanding = -3;
|
||||||
@@ -500,6 +515,7 @@ class Mi171Sh_CZ_EP1_DZE: Mi171Sh_CZ_EP1_DZ {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class RightTurret : MainTurret {
|
class RightTurret : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
proxyIndex = 1;
|
proxyIndex = 1;
|
||||||
gunnerName = $STR_POSITION_CREWCHIEF;
|
gunnerName = $STR_POSITION_CREWCHIEF;
|
||||||
body = "Turret_3";
|
body = "Turret_3";
|
||||||
|
|||||||
@@ -51,11 +51,14 @@ class UH1H_DZ: UH1H_base
|
|||||||
};
|
};
|
||||||
|
|
||||||
class UH1H_DZE: UH1H_DZ {
|
class UH1H_DZE: UH1H_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class MainTurret : MainTurret {
|
class MainTurret : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
class LeftDoorGun : LeftDoorGun {
|
class LeftDoorGun : LeftDoorGun {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -139,18 +139,21 @@ class UH1Y_DZ: UH1_Base {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
class UH1Y_DZE: UH1Y_DZ {
|
class UH1Y_DZE: UH1Y_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
enableManualFire = 0;
|
enableManualFire = 0;
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class MainTurret: MainTurret
|
class MainTurret: MainTurret
|
||||||
{
|
{
|
||||||
//gunnerOpticsModel = "\ca\Weapons\optika_empty";
|
//gunnerOpticsModel = "\ca\Weapons\optika_empty";
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
|
gunnerCompartments = "Compartment3";
|
||||||
};
|
};
|
||||||
class RightDoorGun: RightDoorGun
|
class RightDoorGun: RightDoorGun
|
||||||
{
|
{
|
||||||
//gunnerOpticsModel = "\ca\Weapons\optika_empty";
|
//gunnerOpticsModel = "\ca\Weapons\optika_empty";
|
||||||
visionMode[] = {"Normal","NVG"};
|
visionMode[] = {"Normal","NVG"};
|
||||||
magazines[] = {};
|
magazines[] = {};
|
||||||
|
gunnerCompartments = "Compartment3";
|
||||||
};
|
};
|
||||||
class CoPilotObs: CoPilotObs
|
class CoPilotObs: CoPilotObs
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,11 +28,12 @@ class MH60S_DZ : MH60S {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class MH60S_DZE : MH60S_DZ {
|
class MH60S_DZE : MH60S_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
class Turrets : Turrets {
|
class Turrets : Turrets {
|
||||||
class MainTurret : MainTurret {
|
class MainTurret : MainTurret {
|
||||||
discreteDistance[] = {100, 200, 300, 400, 500, 600, 700, 800};
|
discreteDistance[] = {100, 200, 300, 400, 500, 600, 700, 800};
|
||||||
discreteDistanceInitIndex = 2;
|
discreteDistanceInitIndex = 2;
|
||||||
gunnerCompartments = "Compartment1";
|
gunnerCompartments = "compartment3";
|
||||||
initElev = 5;
|
initElev = 5;
|
||||||
initTurn = 80;
|
initTurn = 80;
|
||||||
body = "mainTurret";
|
body = "mainTurret";
|
||||||
@@ -69,6 +70,7 @@ class MH60S_DZE : MH60S_DZ {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class RightDoorGun : MainTurret {
|
class RightDoorGun : MainTurret {
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
body = "Turret_2";
|
body = "Turret_2";
|
||||||
gun = "Gun_2";
|
gun = "Gun_2";
|
||||||
animationSourceBody = "Turret_2";
|
animationSourceBody = "Turret_2";
|
||||||
@@ -154,6 +156,7 @@ class UH60M_EP1_DZ: UH60M_EP1 {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class UH60M_EP1_DZE: UH60M_EP1_DZ {
|
class UH60M_EP1_DZE: UH60M_EP1_DZ {
|
||||||
|
cargoCompartments[] = {"Compartment1","Compartment2","Compartment3"};
|
||||||
enableManualFire = 0;
|
enableManualFire = 0;
|
||||||
class Turrets: Turrets {
|
class Turrets: Turrets {
|
||||||
class MainTurret: MainTurret {
|
class MainTurret: MainTurret {
|
||||||
@@ -191,7 +194,7 @@ class UH60M_EP1_DZE: UH60M_EP1_DZ {
|
|||||||
minFov = 0.25;
|
minFov = 0.25;
|
||||||
maxFov = 1.1;
|
maxFov = 1.1;
|
||||||
};
|
};
|
||||||
gunnerCompartments = "Compartment2";
|
gunnerCompartments = "compartment3";
|
||||||
};
|
};
|
||||||
class RightDoorGun: MainTurret {
|
class RightDoorGun: MainTurret {
|
||||||
body = "Turret_2";
|
body = "Turret_2";
|
||||||
@@ -216,6 +219,7 @@ class UH60M_EP1_DZE: UH60M_EP1_DZ {
|
|||||||
primaryGunner = 0;
|
primaryGunner = 0;
|
||||||
memoryPointGun = "machinegun_1";
|
memoryPointGun = "machinegun_1";
|
||||||
memoryPointGunnerOptics = "gunnerview_2";
|
memoryPointGunnerOptics = "gunnerview_2";
|
||||||
|
gunnerCompartments = "compartment3";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ if (_inVehicle) then {
|
|||||||
r_player_lastSeat = _assignedRole;
|
r_player_lastSeat = _assignedRole;
|
||||||
local _action = [];
|
local _action = [];
|
||||||
|
|
||||||
if (_vehicle isKindOf "helicopter" || {_inVehicle && {{(isPlayer _x) && (alive _x)} count (crew _vehicle) > 1}}) then {
|
if ((_vehicle isKindOf "helicopter") || {_inVehicle && {{(isPlayer _x) && (alive _x)} count (crew _vehicle) > 1}}) then {
|
||||||
//allow switch to pilot
|
//allow switch to pilot
|
||||||
if (((_assignedRole select 0) != "driver") && {(!alive _driver) || {(_vehicle emptyPositions "Driver") > 0}}) then {
|
if (((_assignedRole select 0) != "driver") && {(!alive _driver) || {(_vehicle emptyPositions "Driver") > 0}}) then {
|
||||||
if (_vehicle isKindOf "helicopter") then {
|
if (_vehicle isKindOf "helicopter") then {
|
||||||
@@ -42,23 +42,25 @@ if (_inVehicle) then {
|
|||||||
r_action2 = true;
|
r_action2 = true;
|
||||||
};
|
};
|
||||||
//allow switch to cargo
|
//allow switch to cargo
|
||||||
if (((_assignedRole select 0) != "cargo") && {(_vehicle emptyPositions "Cargo") > 0}) then {
|
if !(_vehicle isKindOf "helicopter") then {
|
||||||
_action = _vehicle addAction [localize "str_actions_helibackseat", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToCargo",_driver], 0, false, true];
|
if (((_assignedRole select 0) != "cargo") && {(_vehicle emptyPositions "Cargo") > 0}) then {
|
||||||
r_player_actions2 set [count r_player_actions2,_action];
|
_action = _vehicle addAction [localize "str_actions_helibackseat", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToCargo",_driver], 0, false, true];
|
||||||
r_action2 = true;
|
r_player_actions2 set [count r_player_actions2,_action];
|
||||||
};
|
r_action2 = true;
|
||||||
//allow switch to gunner
|
};
|
||||||
if (((_assignedRole select 0) != "Turret") && {(_vehicle emptyPositions "Gunner") > 0}) then {
|
//allow switch to gunner
|
||||||
_action = _vehicle addAction [localize "str_actions_heligunnerseat", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToTurret",_driver], 0, false, true];
|
if ((_assignedRole select 0) != "Turret" && {(_vehicle emptyPositions "Gunner") > 0}) then {
|
||||||
r_player_actions2 set [count r_player_actions2,_action];
|
_action = _vehicle addAction [localize "str_actions_heligunnerseat", "\z\addons\dayz_code\actions\veh_seatActions.sqf",["MoveToTurret",_driver], 0, false, true];
|
||||||
r_action2 = true;
|
r_player_actions2 set [count r_player_actions2,_action];
|
||||||
};
|
r_action2 = true;
|
||||||
//allow switch to commander
|
};
|
||||||
if (((assignedCommander _vehicle) != player) && {(_vehicle emptyPositions "Commander") > 0}) then {
|
//allow switch to commander
|
||||||
_action = _vehicle addAction[localize "STR_EPOCH_PLAYER_311", "\z\addons\dayz_code\actions\veh_seatActions.sqf", ["MoveToTurret", _driver], 0, false, true];
|
if (((assignedCommander _vehicle) != player) && {(_vehicle emptyPositions "Commander") > 0}) then {
|
||||||
r_player_actions2 set [count r_player_actions2,_action];
|
_action = _vehicle addAction[localize "STR_EPOCH_PLAYER_311", "\z\addons\dayz_code\actions\veh_seatActions.sqf", ["MoveToTurret", _driver], 0, false, true];
|
||||||
r_action2 = true;
|
r_player_actions2 set [count r_player_actions2,_action];
|
||||||
};
|
r_action2 = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
if ((count _assignedRole) > 1 || {(_assignedRole select 0) == "driver"}) then {
|
if ((count _assignedRole) > 1 || {(_assignedRole select 0) == "driver"}) then {
|
||||||
local _turret = [-1];
|
local _turret = [-1];
|
||||||
|
|||||||
Reference in New Issue
Block a user