better fix for CH53 and add toggle for #1198

This commit is contained in:
icomrade
2016-05-03 11:14:26 -04:00
parent ea8c14c5fb
commit c2ce8aaf8b
5 changed files with 42 additions and 113 deletions

View File

@@ -36,6 +36,7 @@
[NEW] Gem rarity is now configurable for mining using DZE_GemOccurance =[]; see ConfigVariables.sqf for more info @icomrade [NEW] Gem rarity is now configurable for mining using DZE_GemOccurance =[]; see ConfigVariables.sqf for more info @icomrade
[NEW] Plot Management by Zupa is now included and enabled by default with variable DZE_plotManagement, see ConfigVariables.sqf @DevZupa @Bruce-LXXVI @icomrade [NEW] Plot Management by Zupa is now included and enabled by default with variable DZE_plotManagement, see ConfigVariables.sqf @DevZupa @Bruce-LXXVI @icomrade
[NEW] A Plot For Life by RimBlock is now included and enabled by default with variable DZE_plotforLife, see configVariables.sqf @RimBlock @icomrade [NEW] A Plot For Life by RimBlock is now included and enabled by default with variable DZE_plotforLife, see configVariables.sqf @RimBlock @icomrade
[NEW] You may toggle vehicle destruction effects to prevent damage from vehicle explosions (useful to prevent griefing from ramming) use DZE_NoVehicleExplosions = true; to enable #1198 @icomrade
[CHANGED] Many duplicate functions and variables were renamed. See Documents\1.0.6 Variable Name Changes.txt @ebaydayz [CHANGED] Many duplicate functions and variables were renamed. See Documents\1.0.6 Variable Name Changes.txt @ebaydayz
[CHANGED] Several weapon, item and tool classnames changed. Admins see SQL\1.0.6_Updates @ebaydayz [CHANGED] Several weapon, item and tool classnames changed. Admins see SQL\1.0.6_Updates @ebaydayz

View File

@@ -6,7 +6,6 @@ class CH53_DZE : USEC_ch53_E {
displaynameshort = "CH53_DZE"; displaynameshort = "CH53_DZE";
destrType = "DestructWreck"; destrType = "DestructWreck";
enablemanualfire = 0; enablemanualfire = 0;
secondaryExplosion = -1;
crew = ""; crew = "";
soundGetIn[] = {"\ca\Sounds\Air\Noises\heli_door_01",0.316228,1}; soundGetIn[] = {"\ca\Sounds\Air\Noises\heli_door_01",0.316228,1};
soundGetOut[] = {"\ca\Sounds\Air\Noises\heli_door_01",0.316228,1,30}; soundGetOut[] = {"\ca\Sounds\Air\Noises\heli_door_01",0.316228,1,30};
@@ -31,6 +30,7 @@ class CH53_DZE : USEC_ch53_E {
fuelCapacity = 3849; fuelCapacity = 3849;
class eventhandlers { class eventhandlers {
GetIn = "if ((_this select 2) == player) then {MonitorVM = [_this select 0] execvm '\usec_ch53\scripts\ch53_monitor.sqf';};"; GetIn = "if ((_this select 2) == player) then {MonitorVM = [_this select 0] execvm '\usec_ch53\scripts\ch53_monitor.sqf';};";
init = "MonitorVM = [_this select 0] execvm '\usec_ch53\scripts\ch53_monitor.sqf';MonitorSFXVM = [_this select 0] execvm '\z\addons\dayz_code\system\CH53\ch53_monitorSFX.sqf';"; init = "MonitorVM = [_this select 0] execvm '\usec_ch53\scripts\ch53_monitor.sqf';MonitorSFXVM = [_this select 0] execvm '\usec_ch53\scripts\ch53_monitorSFX.sqf';";
killed = "_this spawn BIS_Effects_EH_Killed;";
}; };
}; };

View File

@@ -14,6 +14,7 @@ dayz_tameDogs = false; // Allow taming dogs with raw meat
dayz_townGenerator = false; // Spawn vanilla map junk in addition to Epoch DynamicDebris. Only works on Chernarus. dayz_townGenerator = false; // Spawn vanilla map junk in addition to Epoch DynamicDebris. Only works on Chernarus.
dayz_townGeneratorBlackList = [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]; // Town generator will not spawn junk within 150m of these positions. dayz_townGeneratorBlackList = [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]; // Town generator will not spawn junk within 150m of these positions.
DayZ_UseSteamID = true; // Use getPlayerUID instead of getPlayerUIDOld DayZ_UseSteamID = true; // Use getPlayerUID instead of getPlayerUIDOld
DZE_NoVehicleExplosions = false; //Disable vehicle explosions to prevent damage to objects by ramming - doesn't work with amphibious pook which you should not use due to other issues
DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with
DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with

View File

@@ -13,38 +13,47 @@ _KillEject = { //leave as local compile for a tiny bit more security
[player, "explosion"] spawn player_death; [player, "explosion"] spawn player_death;
}; };
}; };
if (_v iskindof "helicopter" || _v iskindof "plane") then { if (!DZE_NoVehicleExplosions) then {
if (player in (crew _v)) then { if (_v iskindof "helicopter" || _v iskindof "plane") then {
[] spawn _KillEject; if (player in (crew _v)) then {
[] spawn _KillEject;
};
//_v setVehicleInit "[this] spawn BIS_Effects_AirDestruction";
//processInitCommands; //ClearvehicleInit done at end of burn script
["AirDestruction", _v] call BIS_Effects_globalEvent;
}; };
//_v setVehicleInit "[this] spawn BIS_Effects_AirDestruction"; if (_v iskindof "tank") then {
//processInitCommands; //ClearvehicleInit done at end of burn script if (player in (crew _v)) then {
["AirDestruction", _v] call BIS_Effects_globalEvent; [] spawn _KillEject;
}; };
if (_v iskindof "tank") then { _int = (fuel _v)*(2+random 2);
if (player in (crew _v)) then { _t = time;
[] spawn _KillEject; //_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn",_int, _t]; - disabled to prepaire for move into engine
//processInitCommands; //ClearvehicleInit done at end of burn script
[_v,_int] spawn BIS_Effects_Secondaries;
}; };
_int = (fuel _v)*(2+random 2); if (_v iskindof "car" || _v iskindof "ship")then {
_t = time; if (player in (crew _v)) then {
//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn",_int, _t]; - disabled to prepaire for move into engine [] spawn _KillEject;
//processInitCommands; //ClearvehicleInit done at end of burn script };
[_v,_int] spawn BIS_Effects_Secondaries; _int = (fuel _v)*(2 + random 1);
}; _t = time;
if (_v iskindof "car" || _v iskindof "ship")then {
if (player in (crew _v)) then {
[] spawn _KillEject;
};
_int = (fuel _v)*(2 + random 1);
_t = time;
//_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn; ",_int, _t]; - disabled to prepaire for move into engine //_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn; ",_int, _t]; - disabled to prepaire for move into engine
//processInitCommands; //ClearvehicleInit done at end of burn script //processInitCommands; //ClearvehicleInit done at end of burn script
[_v,_int] spawn BIS_Effects_Secondaries; [_v,_int] spawn BIS_Effects_Secondaries;
//Possible initial explosion //Possible initial explosion
if ((random _int)>2.2) then if ((random _int)>2.2) then
{ {
_b = createVehicle ["SmallSecondary", (getPosATL _v), [], 0, "CAN_COLLIDE"]; _b = createVehicle ["SmallSecondary", (getPosATL _v), [], 0, "CAN_COLLIDE"];
};
};
} else {
_isVeh = (_v iskindof "helicopter" || _v iskindof "plane" || _v iskindof "tank" || _v iskindof "car" || _v iskindof "ship");
if (_isVeh) then {
if (player in (crew _v)) then {
[] spawn _KillEject;
};
}; };
}; };

View File

@@ -1,82 +0,0 @@
_vehicle = _this select 0;
_wait = 0.5;
//Initiate Variables
_RampSound = false;
_gearDown = true;
_gearSound = false;
_vehicle setVariable ["HydraulicsFailure",false, false];
_vehicle setVariable ["EngineFailure",false, false];
_vehicle setVariable ["AvionicsFailure",false, false];
//Overall Event Handlers
_EHDamageIdx = _vehicle addEventHandler ["Dammaged",{
if ((_this select 2) > 0.8 ) then {
switch (_this select 1) do {
case "mala vrtule": {_this select 0 setVariable ["HydraulicsFailure",true, true];};
case "velka vrtule": {_this select 0 setVariable ["HydraulicsFailure",true, true];};
case "motor": {_this select 0 setVariable ["EngineFailure",true, true];};
case "elektronika": {_this select 0 setVariable ["AvionicsFailure",true, true];};
};
};
}];
while {(alive _vehicle)} do {
// SINGLE // Ramp Sound Effect
if((_vehicle animationPhase "ramp_bottom" > 0) && !(_RampSound)) then {
_vehicle say ["ch53_rampdown",5];
_RampSound = true;
sleep 3;
};
// SINGLE // Ramp Sound Effect
if((_vehicle animationPhase "ramp_bottom" < 1) && !(_vehicle animationPhase "ramp_bottom" == 0.56) && (_RampSound)) then {
_vehicle say ["ch53_rampup",5];
_RampSound = false;
sleep 3;
};
// SINGLE // Gear Sound Effect
if((_vehicle animationPhase "gear_nose_1" > 0) && !(_gearSound) && (_gearDown)) then {
_vehicle say ["ch53_gear",5];
_gearSound = true;
};
// SINGLE // Gear Sound Effect
if((_vehicle animationPhase "gear_nose_1" < 1) && (_gearSound) && !(_gearDown)) then {
_vehicle say ["ch53_gear",5];
_gearSound = false;
};
if (player in (crew _vehicle)) then {
// INFO // SINGLE // Gear Down
if((_vehicle animationPhase "gear_nose_1" == 0) && !(_gearDown)) then {
_vehicle vehicleRadio "dws_info_geardown";
_gearDown = true;
sleep 3;
};
// INFO // SINGLE // Gear Up
if((_vehicle animationPhase "gear_nose_1" == 1) && (_gearDown)) then {
_vehicle vehicleRadio "dws_info_gearup";
_gearDown = false;
sleep 3;
};
};
if(player in (crew _vehicle)) then {sleep _wait;} else {sleep (_wait * 4);};
};
if (player in (crew _vehicle) && (!alive _vehicle)) then {
_cancel = false;
{
_SZPos = _x select 0;
_radius = _x select 1;
if ((isInTraderCity || !canbuild) && {(player distance _SZPos) < _radius}) then {_cancel = true;};
} count DZE_SafeZonePosArray;
if (!_cancel) then {
player action ["Eject",vehicle player]; //eject player so I can get their gear
sleep 0.01; //don't use uisleep here
[player, "explosion"] spawn player_death;
};
};
_vehicle removeAllEventHandlers "Dammaged";