Safezone whitelist for eject/destruction fixes

This commit prevents players who destroy their vehicle in god-mode
safezones to be spared by the fixes in #2411973 and #ec7351d

Configurable variable for this change is DZE_SafeZonePosArray = [];

Update suggestion to use the stable branch of A2 OA in the changelog
This commit is contained in:
icomrade
2016-04-27 00:17:54 -04:00
parent f102240821
commit 0e0a1e340f
4 changed files with 25 additions and 8 deletions

View File

@@ -83,6 +83,7 @@
[FIXED] Ponds and lakes are now detected correctly in player_goFishing. #1678 @ebaydayz
[FIXED] Players are now ejected and killed when their vehicle is destroyed. @icomrade
[FIXED] CH53_DZE now explodes and kills passengers upon destruction. @icomrade
[NOTE] Servers that use trader safezones must configure the variable DZE_SafeZonePosArray with their safezone posisitons and radii, otherwise passangers of vehicles in safezones will be killed upon destruction of their vehicle
[UPDATED] .hpp files updated in dayz_epoch_b CfgLootPos > CfgBuildingPos. @Uro1
[UPDATED] .bat files updated in Config-Examples @Raziel23x
@@ -91,6 +92,6 @@
[INFO] Amphibious pook and cessna (pook_h13_amphib,GNT_C185E,GNT_C185F) confirmed to have FPS issues. Using them is not recommended. #1612 @bleeding- @Markokil321
[INFO] Auto login does not force a player who aborted from the game, back to the lobby, to login
[INFO] (EXTREMELY IMPORTANT) Server owners MUST update their required build and beta to 131129
[INFO] Server owners and players should use the stable branch of ArmA 2 OA
[INFO] Models/textures by Paul Tomany. @Sequisha.
[INFO] Special thanks to http://verthosting.com for hosting our development server.

View File

@@ -42,7 +42,7 @@ DZE_UI = "vanilla"; //"vanilla","epoch","dark" UI status icons style. Dark acco
MaxAmmoBoxes = 3; // Max number of random Supply_Crate_DZE to spawn around the map
MaxMineVeins = 50; // Max number of random mine veins to spawn around the map
timezoneswitch = 0; // Changes murderMenu times with this offset in hours.
DZE_SafeZonePosArray = []; //Prevent players in safeZones from being killed if their vehicle is destroyed. Format is [[[3D POS] RADIUS],[[3D POS] RADIUS]]; Ex. DZE_SafeZonePosArray = [[[6325.6772,7807.7412,0],150],[[4063.4226,11664.19,0],150]];
/*
Developers:

View File

@@ -7,9 +7,17 @@ _t=time;
if (!isDedicated) then { //dw, particle stuff don't need run on dedicated
if (player in (crew _v)) then {
[] spawn { //kill players when their vehicle explodes since this is too difficult for ArmA on its own
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;
_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;
};
};
};
_fl = "#particlesource" createVehicleLocal getPosATL _v;

View File

@@ -67,8 +67,16 @@ while {(alive _vehicle)} do {
if(player in (crew _vehicle)) then {sleep _wait;} else {sleep (_wait * 4);};
};
if (player in (crew _vehicle) && (!alive _vehicle)) 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; //kill player
_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";