mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Fix some issues with traps
Removed two unused files. Vanilla commits:42e72463a302726fb1926a7c53ebcf1fb63089959543ea057f
This commit is contained in:
@@ -3,6 +3,10 @@
|
|||||||
[FIXED] Kamaz refuel trucks no longer allow automatic refueling. #1855 @coresync2k @dreamforceinc
|
[FIXED] Kamaz refuel trucks no longer allow automatic refueling. #1855 @coresync2k @dreamforceinc
|
||||||
[FIXED] Trees at POIs can be chopped down now. Other trees spawned with createVehicle can be added to dayz_treeTypes in variables.sqf to allow chopping them down.
|
[FIXED] Trees at POIs can be chopped down now. Other trees spawned with createVehicle can be added to dayz_treeTypes in variables.sqf to allow chopping them down.
|
||||||
[FIXED] POIs were moved back to global spawn again. This synchronizes the POI buildings and trees destroyed/chopped status for all clients.
|
[FIXED] POIs were moved back to global spawn again. This synchronizes the POI buildings and trees destroyed/chopped status for all clients.
|
||||||
|
[FIXED] All traps now need to be armed after placing. This fixes them not triggering right after building.
|
||||||
|
[FIXED] Smoke and grenade tripwires now require a grenade to rearm after triggering.
|
||||||
|
[FIXED] Player no longer does medic animation after triggering a single use trap.
|
||||||
|
[FIXED] Removing a trap with no room in your gear will no longer delete the trap.
|
||||||
|
|
||||||
[NOTE] Fixes below are included in the mission file and server pbo as part of server package 1.0.6.1A (March 10th 2017)
|
[NOTE] Fixes below are included in the mission file and server pbo as part of server package 1.0.6.1A (March 10th 2017)
|
||||||
[FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions.
|
[FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class BearTrap_DZ : TrapItems {
|
|||||||
model = "\dayz_equip\models\bear_trap.p3d";
|
model = "\dayz_equip\models\bear_trap.p3d";
|
||||||
|
|
||||||
script = "beartrap"; // compiled script variable name (used by server side loop)
|
script = "beartrap"; // compiled script variable name (used by server side loop)
|
||||||
initState = 0; // initial armed state
|
initState = 0; // initial armed state (>0 is not currently working)
|
||||||
singleUse = 0;
|
singleUse = 0;
|
||||||
nounderground = 0;
|
nounderground = 0;
|
||||||
requireplot = 0;
|
requireplot = 0;
|
||||||
@@ -128,7 +128,7 @@ class TrapBearTrapFlare : TrapItems {
|
|||||||
constructioncount = 1;
|
constructioncount = 1;
|
||||||
|
|
||||||
script = "beartrapflare"; // compiled script variable name (used by server side loop)
|
script = "beartrapflare"; // compiled script variable name (used by server side loop)
|
||||||
initState = 1; // initial armed state
|
initState = 0; // initial armed state (>0 is not currently working)
|
||||||
singleUse = 1; // gets replaced by BearTrap_DZ due to animation issues
|
singleUse = 1; // gets replaced by BearTrap_DZ due to animation issues
|
||||||
|
|
||||||
class Eventhandlers {
|
class Eventhandlers {
|
||||||
@@ -180,7 +180,7 @@ class TrapBearTrapSmoke : TrapItems {
|
|||||||
constructioncount = 1;
|
constructioncount = 1;
|
||||||
|
|
||||||
script = "beartrapsmoke"; // compiled script variable name (used by server side loop)
|
script = "beartrapsmoke"; // compiled script variable name (used by server side loop)
|
||||||
initState = 1; // initial armed state
|
initState = 0; // initial armed state (>0 is not currently working)
|
||||||
singleUse = 1; // gets replaced by BearTrap_DZ due to animation issues
|
singleUse = 1; // gets replaced by BearTrap_DZ due to animation issues
|
||||||
|
|
||||||
class Eventhandlers {
|
class Eventhandlers {
|
||||||
@@ -230,7 +230,7 @@ class Trap_Cans : TrapItems {
|
|||||||
nounderground = 0;
|
nounderground = 0;
|
||||||
|
|
||||||
script = "tripcans"; // compiled script variable name (used by server side loop)
|
script = "tripcans"; // compiled script variable name (used by server side loop)
|
||||||
initState = 1; // initial armed state
|
initState = 0; // initial armed state (>0 is not currently working)
|
||||||
singleUse = 0;
|
singleUse = 0;
|
||||||
requireplot = 0;
|
requireplot = 0;
|
||||||
constructioncount = 1;
|
constructioncount = 1;
|
||||||
@@ -282,7 +282,7 @@ class TrapTripwireFlare : TrapItems {
|
|||||||
nounderground = 0;
|
nounderground = 0;
|
||||||
|
|
||||||
script = "tripflare"; // compiled script variable name (used by server side loop)
|
script = "tripflare"; // compiled script variable name (used by server side loop)
|
||||||
initState = 1; // initial armed state
|
initState = 0; // initial armed state (>0 is not currently working)
|
||||||
singleUse = 0;
|
singleUse = 0;
|
||||||
requireplot = 0;
|
requireplot = 0;
|
||||||
constructioncount = 1;
|
constructioncount = 1;
|
||||||
@@ -334,8 +334,8 @@ class TrapTripwireGrenade : TrapItems {
|
|||||||
nounderground = 0;
|
nounderground = 0;
|
||||||
|
|
||||||
script = "tripgrenade"; // compiled script variable name (used by server side loop)
|
script = "tripgrenade"; // compiled script variable name (used by server side loop)
|
||||||
initState = 1; // initial armed state
|
initState = 0; // initial armed state (>0 is not currently working)
|
||||||
singleUse = 1;
|
singleUse = 0; //Trap can now be rearmed with another grenade
|
||||||
requireplot = 0;
|
requireplot = 0;
|
||||||
constructioncount = 1;
|
constructioncount = 1;
|
||||||
|
|
||||||
@@ -386,8 +386,8 @@ class TrapTripwireSmoke : TrapItems {
|
|||||||
nounderground = 0;
|
nounderground = 0;
|
||||||
|
|
||||||
script = "tripsmoke"; // compiled script variable name (used by server side loop)
|
script = "tripsmoke"; // compiled script variable name (used by server side loop)
|
||||||
initState = 1; // initial armed state
|
initState = 0; // initial armed state (>0 is not currently working)
|
||||||
singleUse = 1;
|
singleUse = 0; //Trap can now be rearmed with another smoke
|
||||||
requireplot = 0;
|
requireplot = 0;
|
||||||
constructioncount = 1;
|
constructioncount = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ _type = _array select 0;
|
|||||||
_classname = _array select 1;
|
_classname = _array select 1;
|
||||||
_holder = _array select 2;
|
_holder = _array select 2;
|
||||||
|
|
||||||
|
|
||||||
if (player distance _holder > 3) exitwith { localize "str_pickup_limit_1","PLAIN DOWN" };
|
if (player distance _holder > 3) exitwith { localize "str_pickup_limit_1","PLAIN DOWN" };
|
||||||
|
|
||||||
_playerID = getPlayerUID player;
|
_playerID = getPlayerUID player;
|
||||||
@@ -29,8 +28,6 @@ if (isnil "claimed") then {
|
|||||||
|
|
||||||
canPickup = false;
|
canPickup = false;
|
||||||
|
|
||||||
if (_classname isKindOf "TrapBear") exitWith { deleteVehicle _holder; };
|
|
||||||
|
|
||||||
player playActionNow "PutDown";
|
player playActionNow "PutDown";
|
||||||
|
|
||||||
//Adding random chance of arrow is re-usable on pickup
|
//Adding random chance of arrow is re-usable on pickup
|
||||||
@@ -74,6 +71,17 @@ _isOk = [player,_config] call BIS_fnc_invAdd;
|
|||||||
true call dz_fn_meleeMagazines;
|
true call dz_fn_meleeMagazines;
|
||||||
|
|
||||||
if (_isOk) then {
|
if (_isOk) then {
|
||||||
|
if (_holder isKindOf "TrapItems") then {
|
||||||
|
if !(_holder getVariable ["fullRefund",true]) then {
|
||||||
|
//Trap was already triggered, refund all parts except grenade
|
||||||
|
player removeMagazine _classname;
|
||||||
|
["equip_string",1,1] call fn_dropItem;
|
||||||
|
["PartWoodPile",1,1] call fn_dropItem;
|
||||||
|
["equip_duct_tape",1,1] call fn_dropItem;
|
||||||
|
};
|
||||||
|
PVDZ_obj_Destroy = [(_holder getVariable["ObjectID","0"]),(_holder getVariable["ObjectUID","0"]),player];
|
||||||
|
publicVariableServer "PVDZ_obj_Destroy";
|
||||||
|
};
|
||||||
deleteVehicle _holder;
|
deleteVehicle _holder;
|
||||||
} else {
|
} else {
|
||||||
if (!_isOk) exitWith {
|
if (!_isOk) exitWith {
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
private ["_item","_config","_onLadder","_classname","_text","_consume","_hastrapitem","_location","_object"];
|
|
||||||
|
|
||||||
_item = _this;
|
|
||||||
_config = configFile >> "CfgWeapons" >> _item;
|
|
||||||
|
|
||||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
|
||||||
dayz_actionInProgress = true;
|
|
||||||
|
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
|
||||||
if (_onLadder) exitWith { dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;};
|
|
||||||
|
|
||||||
call gear_ui_init;
|
|
||||||
|
|
||||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
|
||||||
_consume = ([] + getArray (_config >> "magazines")) select 0;
|
|
||||||
|
|
||||||
_hastrapitem = _item in magazines player;
|
|
||||||
|
|
||||||
if (!_hastrapitem) exitWith { dayz_actionInProgress = false; format[localize "str_player_31",_text,localize "str_player_31_place"] call dayz_rollingMessages;};
|
|
||||||
|
|
||||||
player removeMagazine _item;
|
|
||||||
_location = getPosATL player;
|
|
||||||
|
|
||||||
player playActionNow "PutDown";
|
|
||||||
sleep 1;
|
|
||||||
|
|
||||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
|
||||||
_object setDir (getDir player);
|
|
||||||
|
|
||||||
_object setVariable ["armed", false, true];
|
|
||||||
|
|
||||||
PVDZ_obj_Publish = [dayz_characterID,_object,[getDir _object, getPosATL _object],[["armed", _object getVariable "armed"]]];
|
|
||||||
publicVariableServer "PVDZ_obj_Publish";
|
|
||||||
diag_log [diag_ticktime, __FILE__, "New Networked object, request to save to hive. PVDZ_obj_Publish:", PVDZ_obj_Publish];
|
|
||||||
|
|
||||||
player reveal _object;
|
|
||||||
|
|
||||||
dayz_actionInProgress = false;
|
|
||||||
format[localize "str_build_01",_text] call dayz_rollingMessages;
|
|
||||||
@@ -103,7 +103,6 @@ if (!isDedicated) then {
|
|||||||
object_upgradeFireplace = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_upgradeFireplace.sqf";
|
object_upgradeFireplace = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_upgradeFireplace.sqf";
|
||||||
player_wearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf";
|
player_wearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_wearClothes.sqf";
|
||||||
player_dropWeapon = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_dropWeapon.sqf";
|
player_dropWeapon = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_dropWeapon.sqf";
|
||||||
//player_setTrap = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_setTrap.sqf";
|
|
||||||
object_pickup = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_pickup.sqf";
|
object_pickup = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_pickup.sqf";
|
||||||
//player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
|
//player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
|
||||||
player_combineMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_combineMags.sqf";
|
player_combineMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_combineMags.sqf";
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ Dayz_attachment_array = ["Attachment_ACG","Attachment_AIM"];
|
|||||||
DayZ_Backpacks = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Pouch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_TerminalPack_EP1","DZ_CompactPack_EP1","DZ_GunBag_EP1","DZ_LargeGunBag_EP1"];
|
DayZ_Backpacks = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Pouch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_TerminalPack_EP1","DZ_CompactPack_EP1","DZ_GunBag_EP1","DZ_LargeGunBag_EP1"];
|
||||||
Dayz_Gutting = ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1","ItemKnifeBlunt"];
|
Dayz_Gutting = ["ItemKnife","ItemKnife5","ItemKnife4","ItemKnife3","ItemKnife2","ItemKnife1","ItemKnifeBlunt"];
|
||||||
DayZ_Ignitors = ["ItemMatchbox","Item5Matchbox","Item4Matchbox","Item3Matchbox","Item2Matchbox","Item1Matchbox"];
|
DayZ_Ignitors = ["ItemMatchbox","Item5Matchbox","Item4Matchbox","Item3Matchbox","Item2Matchbox","Item1Matchbox"];
|
||||||
DayZ_traps = ["Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare"];
|
|
||||||
DayZ_ViralZeds = ["z_new_villager2","z_new_villager3","z_new_villager4","z_new_worker2","z_new_worker3","z_new_worker4"];
|
DayZ_ViralZeds = ["z_new_villager2","z_new_villager3","z_new_villager4","z_new_worker2","z_new_worker3","z_new_worker4"];
|
||||||
DayZ_SafeObjects = ["Base_Fire_DZ","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","Land_Fire_DZ","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","BearTrap_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4"];
|
DayZ_SafeObjects = ["Base_Fire_DZ","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","Land_Fire_DZ","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","BearTrap_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4"];
|
||||||
DayZ_DropDrageeObjects = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","StickFence_DZ","SandNest_DZ","MetalPanel_DZ","WorkBench_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4","WoodFloorHalf_DZ","WoodFloor_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","MetalFloor_DZ","WoodRamp_DZ"];
|
DayZ_DropDrageeObjects = ["WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","StickFence_DZ","SandNest_DZ","MetalPanel_DZ","WorkBench_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4","WoodFloorHalf_DZ","WoodFloor_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","MetalFloor_DZ","WoodRamp_DZ"];
|
||||||
@@ -378,7 +377,6 @@ dayz_maxMaxModels = 80; // max quantity of Man models (player or Z, dead or aliv
|
|||||||
dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks
|
dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks
|
||||||
dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
|
dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
|
||||||
dayz_canDelete = 350; // Z, further than this distance from its "owner", will be deleted
|
dayz_canDelete = 350; // Z, further than this distance from its "owner", will be deleted
|
||||||
dayz_traps = [];
|
|
||||||
dayz_traps_active = [];
|
dayz_traps_active = [];
|
||||||
dayz_traps_trigger = [];
|
dayz_traps_trigger = [];
|
||||||
|
|
||||||
@@ -544,6 +542,7 @@ if (isNil "DZE_slowZombies") then {DZE_slowZombies = false;};
|
|||||||
TimeOutDisplayed = false;
|
TimeOutDisplayed = false;
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
|
dayz_traps = [];
|
||||||
dead_bodyCleanup = [];
|
dead_bodyCleanup = [];
|
||||||
needUpdate_objects = [];
|
needUpdate_objects = [];
|
||||||
needUpdate_FenceObjects = [];
|
needUpdate_FenceObjects = [];
|
||||||
|
|||||||
@@ -12,9 +12,6 @@ _init = {
|
|||||||
|
|
||||||
_arm = {
|
_arm = {
|
||||||
//if (isServer) then {
|
//if (isServer) then {
|
||||||
_trap animate ["LeftShutter", 0];
|
|
||||||
_trap animate ["RightShutter", 0];
|
|
||||||
|
|
||||||
_trigger = createTrigger ["EmptyDetector", getPosATL _trap];
|
_trigger = createTrigger ["EmptyDetector", getPosATL _trap];
|
||||||
_trigger setpos getPosATL _trap;
|
_trigger setpos getPosATL _trap;
|
||||||
_trigger setTriggerArea [0.5, 0.5, 0, false];
|
_trigger setTriggerArea [0.5, 0.5, 0, false];
|
||||||
@@ -27,7 +24,7 @@ _arm = {
|
|||||||
|
|
||||||
[_trap, _trigger] call arm_trap;
|
[_trap, _trigger] call arm_trap;
|
||||||
//} else {
|
//} else {
|
||||||
_trap setVariable ["armed", true, true];
|
//_trap setVariable ["armed", true, true];
|
||||||
//};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ _init = {
|
|||||||
|
|
||||||
_arm = {
|
_arm = {
|
||||||
//if (isServer) then {
|
//if (isServer) then {
|
||||||
// don't work (due to proxies n stuff)
|
|
||||||
//_trap animate ["LeftShutter", 0];
|
|
||||||
//_trap animate ["RightShutter", 0];
|
|
||||||
|
|
||||||
_trigger = createTrigger ["EmptyDetector", getPosATL _trap];
|
_trigger = createTrigger ["EmptyDetector", getPosATL _trap];
|
||||||
_trigger setpos getPosATL _trap;
|
_trigger setpos getPosATL _trap;
|
||||||
_trigger setTriggerArea [0.5, 0.5, 0, false];
|
_trigger setTriggerArea [0.5, 0.5, 0, false];
|
||||||
@@ -28,7 +24,7 @@ _arm = {
|
|||||||
|
|
||||||
[_trap, _trigger] call arm_trap;
|
[_trap, _trigger] call arm_trap;
|
||||||
//} else {
|
//} else {
|
||||||
_trap setVariable ["armed", true, true];
|
//_trap setVariable ["armed", true, true];
|
||||||
//};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ _init = {
|
|||||||
|
|
||||||
_arm = {
|
_arm = {
|
||||||
//if (isServer) then {
|
//if (isServer) then {
|
||||||
// don't work (due to proxies n stuff)
|
|
||||||
//_trap animate ["LeftShutter", 0];
|
|
||||||
//_trap animate ["RightShutter", 0];
|
|
||||||
|
|
||||||
_trigger = createTrigger ["EmptyDetector", getPosATL _trap];
|
_trigger = createTrigger ["EmptyDetector", getPosATL _trap];
|
||||||
_trigger setpos getPosATL _trap;
|
_trigger setpos getPosATL _trap;
|
||||||
_trigger setTriggerArea [0.5, 0.5, 0, false];
|
_trigger setTriggerArea [0.5, 0.5, 0, false];
|
||||||
@@ -28,7 +24,7 @@ _arm = {
|
|||||||
|
|
||||||
[_trap, _trigger] call arm_trap;
|
[_trap, _trigger] call arm_trap;
|
||||||
//} else {
|
//} else {
|
||||||
_trap setVariable ["armed", true, true];
|
//_trap setVariable ["armed", true, true];
|
||||||
//};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,20 @@
|
|||||||
_trap = _this select 0;
|
_trap = _this select 0;
|
||||||
_trigger = _this select 1;
|
_trigger = _this select 1;
|
||||||
|
|
||||||
|
//Doesn't work on flare and smoke beartraps "due to proxies n stuff"
|
||||||
_trap animate ['LeftShutter', 0];
|
_trap animate ['LeftShutter', 0];
|
||||||
_trap animate ['RightShutter', 0];
|
_trap animate ['RightShutter', 0];
|
||||||
|
|
||||||
_trap setVariable ["armed", true, true];
|
if !(_trap getVariable ["armed", false]) then {
|
||||||
|
_trap setVariable ["armed", true, true];
|
||||||
|
};
|
||||||
|
|
||||||
PVDZ_veh_Save = [_trap, "gear"];
|
PVDZ_veh_Save = [_trap, "gear"];
|
||||||
publicVariableServer "PVDZ_veh_Save";
|
if (isServer) then {
|
||||||
|
PVDZ_veh_Save call server_updateObject;
|
||||||
|
} else {
|
||||||
|
publicVariableServer "PVDZ_veh_Save";
|
||||||
|
};
|
||||||
|
|
||||||
dayz_traps_active set [count dayz_traps_active, _trap];
|
dayz_traps_active set [count dayz_traps_active, _trap];
|
||||||
dayz_traps_trigger set [count dayz_traps_trigger, _trigger];
|
dayz_traps_trigger set [count dayz_traps_trigger, _trigger];
|
||||||
|
|||||||
@@ -3,9 +3,16 @@ _trap = _this select 0;
|
|||||||
_trap animate ['LeftShutter', 1];
|
_trap animate ['LeftShutter', 1];
|
||||||
_trap animate ['RightShutter', 1];
|
_trap animate ['RightShutter', 1];
|
||||||
|
|
||||||
_trap setVariable ["armed", false, true];
|
if (_trap getVariable ["armed", false]) then {
|
||||||
|
_trap setVariable ["armed", false, true];
|
||||||
|
};
|
||||||
|
|
||||||
PVDZ_veh_Save = [_trap, "gear"];
|
PVDZ_veh_Save = [_trap, "gear"];
|
||||||
publicVariableServer "PVDZ_veh_Save";
|
if (isServer) then {
|
||||||
|
PVDZ_veh_Save call server_updateObject;
|
||||||
|
} else {
|
||||||
|
publicVariableServer "PVDZ_veh_Save";
|
||||||
|
};
|
||||||
|
|
||||||
if (_trap in dayz_traps_active) then {
|
if (_trap in dayz_traps_active) then {
|
||||||
deleteVehicle (dayz_traps_trigger select (dayz_traps_active find _trap));
|
deleteVehicle (dayz_traps_trigger select (dayz_traps_active find _trap));
|
||||||
|
|||||||
@@ -7,5 +7,11 @@ _objectUID = _obj getVariable ["ObjectUID","0"];
|
|||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
[_objectID,_objectUID,"__SERVER__"] call server_deleteObj;
|
[_objectID,_objectUID,"__SERVER__"] call server_deleteObj;
|
||||||
} else {
|
} else {
|
||||||
[nil,nil,nil,_obj] execVM "\z\addons\dayz_code\actions\remove.sqf";
|
if (count _this == 2) then {
|
||||||
|
//single use trap triggered, remove with no animation
|
||||||
|
//For normal remove let object_pickup.sqf perform deletion to ensure player has room in gear first, no others remove at same time and animation runs
|
||||||
|
PVDZ_obj_Destroy = [_objectID,_objectUID,player];
|
||||||
|
publicVariableServer "PVDZ_obj_Destroy";
|
||||||
|
deleteVehicle _obj;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
@@ -10,7 +10,9 @@ if (!isNull _trap) then {
|
|||||||
if (isNull _trap) exitWith { /* break from loop */ };
|
if (isNull _trap) exitWith { /* break from loop */ };
|
||||||
|
|
||||||
if (((parseNumber _id > 0) || (parseNumber _uid > 0)) && !isNil "_armed") exitWith {
|
if (((parseNumber _id > 0) || (parseNumber _uid > 0)) && !isNil "_armed") exitWith {
|
||||||
dayz_traps set [count dayz_traps, _trap];
|
if (isServer) then {
|
||||||
|
dayz_traps set [count dayz_traps, _trap];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
uiSleep 0.5;
|
uiSleep 0.5;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
_trap = _this select 0;
|
_trap = _this select 0;
|
||||||
|
|
||||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
|
if (getNumber (configFile >> "CfgVehicles" >> typeOf _trap >> "singleUse") > 0) then {
|
||||||
[_trap] call remove_trap;
|
[_trap,true] call remove_trap;
|
||||||
} else {
|
} else {
|
||||||
[_trap] call disarm_trap;
|
[_trap] call disarm_trap;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ _arm = {
|
|||||||
|
|
||||||
[_trap, _trigger] call arm_trap;
|
[_trap, _trigger] call arm_trap;
|
||||||
//} else {
|
//} else {
|
||||||
_trap setVariable ["armed", true, true];
|
//_trap setVariable ["armed", true, true];
|
||||||
//};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ _arm = {
|
|||||||
|
|
||||||
[_trap, _trigger] call arm_trap;
|
[_trap, _trigger] call arm_trap;
|
||||||
//} else {
|
//} else {
|
||||||
_trap setVariable ["armed", true, true];
|
//_trap setVariable ["armed", true, true];
|
||||||
//};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,24 @@ _init = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_arm = {
|
_arm = {
|
||||||
|
_exit = false;
|
||||||
|
|
||||||
|
if (!isDedicated && !(_trap getVariable["fullRefund",true])) then {
|
||||||
|
_exit = true;
|
||||||
|
{
|
||||||
|
if (_x in magazines player) exitWith {
|
||||||
|
player removeMagazine _x;
|
||||||
|
_exit = false;
|
||||||
|
_trap setVariable ["fullRefund",true,true];
|
||||||
|
};
|
||||||
|
} count ["HandGrenade_West","HandGrenade_East"];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_exit) exitWith {
|
||||||
|
//Trap was already triggered, require grenade to rearm
|
||||||
|
format[localize "str_player_03",localize "str_dn_grenade"] call dayz_rollingMessages;
|
||||||
|
};
|
||||||
|
|
||||||
//if (isServer) then {
|
//if (isServer) then {
|
||||||
_pos = getPosATL _trap;
|
_pos = getPosATL _trap;
|
||||||
_pos1 = _trap modelToWorld (_trap selectionPosition "TripA");
|
_pos1 = _trap modelToWorld (_trap selectionPosition "TripA");
|
||||||
@@ -28,7 +46,7 @@ _arm = {
|
|||||||
|
|
||||||
[_trap, _trigger] call arm_trap;
|
[_trap, _trigger] call arm_trap;
|
||||||
//} else {
|
//} else {
|
||||||
_trap setVariable ["armed", true, true];
|
//_trap setVariable ["armed", true, true];
|
||||||
//};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -45,6 +63,8 @@ _remove = {
|
|||||||
[_trap] call remove_trap;
|
[_trap] call remove_trap;
|
||||||
} else {
|
} else {
|
||||||
[_trap] call remove_trap;
|
[_trap] call remove_trap;
|
||||||
|
|
||||||
|
//Refund is determined in object_pickup.sqf
|
||||||
[0,0,0,["cfgMagazines","ItemTrapTripwireGrenade",_trap]] spawn object_pickup;
|
[0,0,0,["cfgMagazines","ItemTrapTripwireGrenade",_trap]] spawn object_pickup;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -62,6 +82,10 @@ _trigger = {
|
|||||||
_flare = createVehicle ["GrenadeHandTimedWest_DZ", _position, [], 0, "CAN_COLLIDE"];
|
_flare = createVehicle ["GrenadeHandTimedWest_DZ", _position, [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
[_trap] call trigger_trap;
|
[_trap] call trigger_trap;
|
||||||
|
//Trap is left nearby to allow null source in damage handler.
|
||||||
|
|
||||||
|
//TO-DO: save this variable to DB, currently allows one free rearm after server restart
|
||||||
|
_trap setVariable ["fullRefund",false,true];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,24 @@ _init = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_arm = {
|
_arm = {
|
||||||
|
_exit = false;
|
||||||
|
|
||||||
|
if (!isDedicated && !(_trap getVariable["fullRefund",true])) then {
|
||||||
|
_exit = true;
|
||||||
|
{
|
||||||
|
if (_x in magazines player) exitWith {
|
||||||
|
player removeMagazine _x;
|
||||||
|
_exit = false;
|
||||||
|
_trap setVariable ["fullRefund",true,true];
|
||||||
|
};
|
||||||
|
} count ["SmokeShell","SmokeShellRed","SmokeShellGreen"];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_exit) exitWith {
|
||||||
|
//Trap was already triggered, require smoke to rearm
|
||||||
|
format[localize "str_player_03",localize "str_dn_smoke"] call dayz_rollingMessages;
|
||||||
|
};
|
||||||
|
|
||||||
//if (isServer) then {
|
//if (isServer) then {
|
||||||
_pos = getPosATL _trap;
|
_pos = getPosATL _trap;
|
||||||
_pos1 = _trap modelToWorld (_trap selectionPosition "TripA");
|
_pos1 = _trap modelToWorld (_trap selectionPosition "TripA");
|
||||||
@@ -28,7 +46,7 @@ _arm = {
|
|||||||
|
|
||||||
[_trap, _trigger] call arm_trap;
|
[_trap, _trigger] call arm_trap;
|
||||||
//} else {
|
//} else {
|
||||||
_trap setVariable ["armed", true, true];
|
//_trap setVariable ["armed", true, true];
|
||||||
//};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -45,12 +63,14 @@ _remove = {
|
|||||||
[_trap] call remove_trap;
|
[_trap] call remove_trap;
|
||||||
} else {
|
} else {
|
||||||
[_trap] call remove_trap;
|
[_trap] call remove_trap;
|
||||||
|
|
||||||
|
//Refund is determined in object_pickup.sqf
|
||||||
[0,0,0,["cfgMagazines","ItemTrapTripwireSmoke",_trap]] spawn object_pickup;
|
[0,0,0,["cfgMagazines","ItemTrapTripwireSmoke",_trap]] spawn object_pickup;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_trigger = {
|
_trigger = {
|
||||||
//if (isServer) then {
|
if (isServer) then {
|
||||||
private "_entity";
|
private "_entity";
|
||||||
_entity = _this select 0;
|
_entity = _this select 0;
|
||||||
|
|
||||||
@@ -62,7 +82,10 @@ _trigger = {
|
|||||||
_flare = createVehicle ["SmokeShell", _position, [], 0, "CAN_COLLIDE"];
|
_flare = createVehicle ["SmokeShell", _position, [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
[_trap] call trigger_trap;
|
[_trap] call trigger_trap;
|
||||||
//};
|
|
||||||
|
//TO-DO: save this variable to DB, currently allows one free rearm after server restart
|
||||||
|
_trap setVariable ["fullRefund",false,true];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
private ["_event", "_trap", "_args"];
|
private ["_event", "_trap", "_args"];
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ call compile preprocessFileLineNumbers (_base+"sched_lootpiles.sqf");
|
|||||||
//call compile preprocessFileLineNumbers (_base+"sched_playersHivesync.sqf");
|
//call compile preprocessFileLineNumbers (_base+"sched_playersHivesync.sqf");
|
||||||
//call compile preprocessFileLineNumbers (_base+"sched_vehiclesHivesync.sqf");
|
//call compile preprocessFileLineNumbers (_base+"sched_vehiclesHivesync.sqf");
|
||||||
call compile preprocessFileLineNumbers (_base+"sched_sync.sqf");
|
call compile preprocessFileLineNumbers (_base+"sched_sync.sqf");
|
||||||
//call compile preprocessFileLineNumbers (_base+"sched_traps.sqf");
|
|
||||||
call compile preprocessFileLineNumbers (_base+"sched_safetyVehicle.sqf");
|
call compile preprocessFileLineNumbers (_base+"sched_safetyVehicle.sqf");
|
||||||
|
|
||||||
[
|
[
|
||||||
@@ -18,7 +17,6 @@ call compile preprocessFileLineNumbers (_base+"sched_safetyVehicle.sqf");
|
|||||||
[ 6, 340, sched_lootpiles ],
|
[ 6, 340, sched_lootpiles ],
|
||||||
[ 900, 0, sched_sync ],
|
[ 900, 0, sched_sync ],
|
||||||
[ 120, 48, sched_safetyVehicle ]
|
[ 120, 48, sched_safetyVehicle ]
|
||||||
//[ 0.1, 1, sched_traps ]
|
|
||||||
] execFSM ("z\addons\dayz_code\system\scheduler\scheduler.fsm");
|
] execFSM ("z\addons\dayz_code\system\scheduler\scheduler.fsm");
|
||||||
|
|
||||||
//diag_log [ __FILE__, "Scheduler started"];
|
//diag_log [ __FILE__, "Scheduler started"];
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
sched_traps = {
|
|
||||||
private ["_n","_x"];
|
|
||||||
// EVERY 5 SECONDS
|
|
||||||
// CHECK TRAPS STATE
|
|
||||||
if (!isNil "dayz_traps") then {
|
|
||||||
_n = 0;
|
|
||||||
{
|
|
||||||
if ((isNil "_x") OR {(isNull _x)}) then {
|
|
||||||
dayz_traps = dayz_traps - [_x];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (_x getVariable ["armed", false]) then {
|
|
||||||
if !(_x in dayz_traps_active) then {
|
|
||||||
["arm", _x] call compile getText (configFile >> "CfgVehicles" >> typeOf _x >> "script");
|
|
||||||
if !(_x in dayz_traps_active) then { dayz_traps_active set [ count dayz_traps_active, _x ]; };
|
|
||||||
_n = _n + 1;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
if (_x in dayz_traps_active) then {
|
|
||||||
["disarm", _x] call compile getText (configFile >> "CfgVehicles" >> typeOf _x >> "script");
|
|
||||||
if (_x in dayz_traps_active) then { dayz_traps_active = dayz_traps_active - [_x]; };
|
|
||||||
_n = _n + 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} forEach dayz_traps;
|
|
||||||
if (_n > 0) then {
|
|
||||||
diag_log format ["%1: traps polling, changed %2 states", __FILE__, _n];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
objNull
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user