mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
1.0.1.7 DEV TEST
+ [CHANGED] Can now fill empty fuel barrels on standard fuel tanks. + [CHANGED] Increased range of crafting from 2m to 3m + [FIXED] Removed repair action from tow truck with VIL_asistvan_DZE + [ADDED] Tow truck VIL_asistvan_DZE can tow vehicles that fit within the bounding box of the model. + [ADDED] Ability for fuel trucks to fill nearby vehicles 30m when engine is running. + [CHANGED] Reworked Epoch events scheduler and made it more accurate. + [REMOVED] Road debris no longer spawn loot, helps with performance and we have added extra loot positions in the world. + and more
This commit is contained in:
@@ -14,17 +14,10 @@ class Flare : GrenadeLauncher {
|
||||
"FoodCanDemonEmpty",
|
||||
"FoodCanFraggleosEmpty",
|
||||
"FoodCanHerpyEmpty",
|
||||
"FoodCanDerpyEmpty",
|
||||
"FoodCanOrlokEmpty",
|
||||
"FoodCanPowellEmpty",
|
||||
"FoodCanTylersEmpty",
|
||||
"FoodCanUnlabeledEmpty",
|
||||
"FoodCanRusUnlabeledEmpty",
|
||||
"FoodCanRusPorkEmpty",
|
||||
"FoodCanRusPeasEmpty",
|
||||
"FoodCanRusMilkEmpty",
|
||||
"FoodCanRusCornEmpty",
|
||||
"FoodCanRusStewEmpty",
|
||||
"ItemSodaCokeEmpty",
|
||||
"ItemSodaPepsiEmpty",
|
||||
"ItemSodaMdewEmpty",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
class ItemCrowbar: ItemCore
|
||||
{
|
||||
scope=2;
|
||||
displayName=$STR_EQUIP_NAME_CROWBAR;
|
||||
displayName="Crowbar";
|
||||
model="\dayz_equip\models\crowbar.p3d";
|
||||
picture="\z\addons\dayz_communityassets\pictures\equip_crowbar_CA.paa";
|
||||
descriptionShort=$STR_EQUIP_DESC_CROWBAR;
|
||||
descriptionShort="A tool consisting of a metal bar with a single curved end and flattened points, often with a small fissure on one or both ends for removing nails.";
|
||||
class ItemActions
|
||||
{
|
||||
class Toolbelt
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
class ItemHatchet : ItemCore {
|
||||
displayName = $STR_EQUIP_NAME_HATCHET;
|
||||
descriptionShort = $STR_EQUIP_DESC_HATCHET;
|
||||
displayName="$STR_EQUIP_NAME_41";
|
||||
descriptionShort="$STR_EQUIP_DESC_41";
|
||||
|
||||
class ItemActions {
|
||||
class Toolbelt {
|
||||
text = $STR_ACTIONS_RFROMTB;
|
||||
|
||||
class Toolbelt
|
||||
{
|
||||
text="Remove from Toolbelt";
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
"ItemHatchet"
|
||||
};
|
||||
output[]=
|
||||
{
|
||||
"MeleeHatchet"
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,15 +1,15 @@
|
||||
class ItemMachete: ItemCore
|
||||
{
|
||||
scope=2;
|
||||
displayName="$STR_EQUIP_NAME_MACHETE";
|
||||
displayName="Machete";
|
||||
model="\z\addons\dayz_communityassets\models\machete.p3d";
|
||||
picture="\z\addons\dayz_communityassets\pictures\equip_machete_CA.paa";
|
||||
descriptionShort="$STR_EQUIP_DESC_MACHETE";
|
||||
descriptionShort="An agricultural tool turned into a weapon, the Machete may be less versatile than the common hatchet, but it packs a punch.";
|
||||
class ItemActions
|
||||
{
|
||||
class Toolbelt
|
||||
{
|
||||
text=$STR_ACTIONS_RFROMTB;
|
||||
text="Remove from Toolbelt";
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ class MeleeCrowbar: MeleeWeapon
|
||||
magazineReloadTime=0;
|
||||
model="\dayz_weapons\models\crowbar_weaponized";
|
||||
picture="\dayz_weapons\textures\equip_crowbar_CA.paa";
|
||||
displayName=$STR_EQUIP_NAME_CROWBAR;
|
||||
displayName="Crowbar";
|
||||
droppeditem= "ItemCrowbar";
|
||||
magazines[]=
|
||||
{
|
||||
@@ -21,7 +21,7 @@ class MeleeCrowbar: MeleeWeapon
|
||||
{
|
||||
class Toolbelt
|
||||
{
|
||||
text=$STR_ACTIONS_2TB;
|
||||
text="Add to Toolbelt";
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
@@ -32,20 +32,10 @@ class MeleeCrowbar: MeleeWeapon
|
||||
"ItemCrowbar"
|
||||
};
|
||||
};
|
||||
|
||||
class Drop
|
||||
{
|
||||
text=$STR_ACTIONS_DROP;
|
||||
script="spawn player_dropWeapon;";
|
||||
use[]=
|
||||
{
|
||||
"Crowbar_Swing"
|
||||
};
|
||||
};
|
||||
};
|
||||
class Library
|
||||
{
|
||||
libTextDesc=$STR_EQUIP_DESC_CROWBAR;
|
||||
libTextDesc="A tool consisting of a metal bar with a single curved end and flattened points, often with a small fissure on one or both ends for removing nails.";
|
||||
};
|
||||
descriptionShort=$STR_EQUIP_DESC_CROWBAR;
|
||||
descriptionShort="A tool consisting of a metal bar with a single curved end and flattened points, often with a small fissure on one or both ends for removing nails.";
|
||||
};
|
||||
@@ -15,7 +15,7 @@ class MeleeFishingPole: MeleeWeapon
|
||||
class Use
|
||||
{
|
||||
text="Cast Fishing Pole";
|
||||
script="spawn DZE_player_goFishing;";
|
||||
script="spawn player_goFishing;";
|
||||
};
|
||||
class Toolbelt
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ class MeleeHatchet: MeleeWeapon
|
||||
magazineReloadTime=0;
|
||||
model="\dayz_weapons\models\Hatchet_weaponized";
|
||||
picture="\dayz_equip\textures\equip_hatchet_CA.paa";
|
||||
displayName=$STR_EQUIP_NAME_HATCHET;
|
||||
displayName="$STR_EQUIP_NAME_41";
|
||||
droppeditem= "ItemHatchet";
|
||||
magazines[]=
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class MeleeHatchet: MeleeWeapon
|
||||
};
|
||||
class Toolbelt
|
||||
{
|
||||
text=$STR_ACTIONS_2TB;
|
||||
text="Add to Toolbelt";
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
@@ -37,21 +37,10 @@ class MeleeHatchet: MeleeWeapon
|
||||
"ItemHatchet"
|
||||
};
|
||||
};
|
||||
|
||||
class Drop
|
||||
{
|
||||
text=$STR_ACTIONS_DROP;
|
||||
script="spawn player_dropWeapon;";
|
||||
use[]=
|
||||
{
|
||||
"Hatchet_Swing"
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
class Library
|
||||
{
|
||||
libTextDesc=$STR_EQUIP_DESC_HATCHET;
|
||||
libTextDesc="$STR_EQUIP_DESC_41";
|
||||
};
|
||||
descriptionShort=$STR_EQUIP_DESC_HATCHET;
|
||||
descriptionShort="$STR_EQUIP_DESC_41";
|
||||
};
|
||||
@@ -6,7 +6,7 @@ class MeleeMachete: MeleeWeapon
|
||||
magazineReloadTime=0;
|
||||
model="\z\addons\dayz_communityassets\models\machete_weaponized.p3d";
|
||||
picture="\z\addons\dayz_communityassets\pictures\equip_machete_CA.paa";
|
||||
displayName="$STR_EQUIP_NAME_MACHETE";
|
||||
displayName="Machete";
|
||||
droppeditem= "MeleeMachete";
|
||||
magazines[]=
|
||||
{
|
||||
@@ -19,21 +19,23 @@ class MeleeMachete: MeleeWeapon
|
||||
};
|
||||
class ItemActions
|
||||
{
|
||||
/*
|
||||
class Drop
|
||||
class Toolbelt
|
||||
{
|
||||
text=$STR_ACTIONS_DROP;
|
||||
script="spawn player_dropWeapon;";
|
||||
text="Add to Toolbelt";
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
"Machete_Swing"
|
||||
"MeleeMachete"
|
||||
};
|
||||
output[]=
|
||||
{
|
||||
"ItemMachete"
|
||||
};
|
||||
};
|
||||
*/
|
||||
};
|
||||
class Library
|
||||
{
|
||||
libTextDesc="$STR_EQUIP_DESC_MACHETE";
|
||||
libTextDesc="";
|
||||
};
|
||||
descriptionShort="$STR_EQUIP_DESC_MACHETE";
|
||||
descriptionShort="An agricultural tool turned into a weapon, the Machete may be less versatile than the common hatchet, but it packs a punch.";
|
||||
};
|
||||
@@ -25,6 +25,13 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class VIL_asistvan;
|
||||
class VIL_asistvan_DZE: VIL_asistvan
|
||||
{
|
||||
transportrepair = 0;
|
||||
};
|
||||
|
||||
class Mi17_base: Helicopter
|
||||
{
|
||||
class Turrets: Turrets
|
||||
|
||||
@@ -149,7 +149,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 1.0.1.6";
|
||||
text = "DayZ Epoch 1.0.1.7";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
delete CA_TitleMainMenu;
|
||||
|
||||
@@ -3,11 +3,25 @@ private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_
|
||||
if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Get all nearby vehicles within 10m
|
||||
_findNearestVehicles = nearestObjects [player, ["AllVehicles"], 10];
|
||||
_isVehicle = false;
|
||||
|
||||
_vehicleSrc = _this select 0;
|
||||
|
||||
if(_vehicleSrc != objNull) then {
|
||||
|
||||
_isVehicle = ((_vehicleSrc isKindOf "AllVehicles") and !(_vehicleSrc isKindOf "Man"));
|
||||
|
||||
// If fuel source is vehicle get actual capacity
|
||||
_configSrcVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicleSrc);
|
||||
_capacitySrc = getNumber(_configVeh >> "fuelCapacity");
|
||||
_nameTextSrc = getText(_configVeh >> "displayName");
|
||||
};
|
||||
|
||||
// Get all nearby vehicles within 30m
|
||||
_findNearestVehicles = nearestObjects [player, ["AllVehicles"], 30];
|
||||
_findNearestVehicle = [];
|
||||
{
|
||||
if (alive _x and !(_x isKindOf "Man")) then {
|
||||
if (alive _x and _vehicleSrc != _x and !(_x isKindOf "Man")) then {
|
||||
_findNearestVehicle set [(count _findNearestVehicle),_x];
|
||||
};
|
||||
} foreach _findNearestVehicles;
|
||||
@@ -24,7 +38,6 @@ if(_IsNearVehicle >= 1) then {
|
||||
_capacity = getNumber(_configVeh >> "fuelCapacity");
|
||||
_nameText = getText(_configVeh >> "displayName");
|
||||
|
||||
|
||||
_isOk = true;
|
||||
// perform fuel up
|
||||
while {_isOk} do {
|
||||
@@ -76,6 +89,26 @@ if(_IsNearVehicle >= 1) then {
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_isFillok = true;
|
||||
|
||||
// add checks for fuel level
|
||||
if(_isVehicle) then {
|
||||
_curFuelSrc = ((fuel _vehicleSrc) * _capacitySrc);
|
||||
_newFuelSrc = (_curFuelSrc - _canSize);
|
||||
|
||||
// calculate new fuel
|
||||
_newFuelSrc = (_newFuelSrc / _capacitySrc);
|
||||
if (_newFuelSrc > 0) then {
|
||||
dayzSetFuel = [_vehicleSrc,_newFuelSrc];
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
publicVariable "dayzSetFuel";
|
||||
} else {
|
||||
_isFillok = false;
|
||||
_abort = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_isFillok) then {
|
||||
// Get vehicle fuel levels again
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel + _canSize);
|
||||
@@ -86,9 +119,7 @@ if(_IsNearVehicle >= 1) then {
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
if (local _vehicle) then {
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
};
|
||||
publicVariable "dayzSetFuel";
|
||||
|
||||
// Play sound
|
||||
@@ -96,6 +127,7 @@ if(_IsNearVehicle >= 1) then {
|
||||
|
||||
cutText [format["%1 filled to %2 percent capacity.",_nameText,round(_newFuel*100)], "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {};
|
||||
sleep 1;
|
||||
|
||||
@@ -9,17 +9,22 @@ s_player_fillfuel = 1;
|
||||
_fillCounter = 0;
|
||||
_abort = false;
|
||||
|
||||
_qty = {_x == "ItemJerrycanEmpty"} count magazines player;
|
||||
_fuelCans = [];
|
||||
|
||||
for "_x" from 1 to _qty do {
|
||||
{
|
||||
if(_x == "ItemJerrycanEmpty" or _x == "ItemFuelBarrelEmpty") then {
|
||||
_fuelCans set [(count _fuelCans),_x];
|
||||
};
|
||||
} forEach magazines player;
|
||||
|
||||
_qty = count _fuelCans;
|
||||
|
||||
{
|
||||
_displayName = getText (configFile >> "cfgMagazines" >> _x >> "displayName");
|
||||
|
||||
_fillCounter = _fillCounter + 1;
|
||||
|
||||
if(_qty == 1) then {
|
||||
cutText ["Preparing to siphon, stand still to fill empty jerry can.", "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("Preparing to siphon, stand still to fill empty jerry can %1 of %2."),_fillCounter,_qty] , "PLAIN DOWN"];
|
||||
};
|
||||
cutText [format["Preparing to siphon, stand still to fill %1.",_displayName], "PLAIN DOWN"];
|
||||
|
||||
// force animation
|
||||
player playActionNow "Medic";
|
||||
@@ -64,22 +69,22 @@ for "_x" from 1 to _qty do {
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
if ("ItemJerrycanEmpty" in magazines player) then {
|
||||
|
||||
player removeMagazine "ItemJerrycanEmpty";
|
||||
player addMagazine "ItemJerrycan";
|
||||
|
||||
cutText [format[(localize "str_player_09"),1], "PLAIN DOWN"];
|
||||
if(([player,_x] call BIS_fnc_invRemove) == 1) then {
|
||||
if (_x == "ItemFuelBarrelEmpty") then {
|
||||
player addMagazine "ItemFuelBarrel";
|
||||
} else {
|
||||
player addMagazine "ItemJerrycan";
|
||||
};
|
||||
cutText [format["You have filled %1 with fuel.",_displayName], "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [(localize "str_player_10") , "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
};
|
||||
|
||||
sleep 1;
|
||||
if(_abort) exitWith {};
|
||||
};
|
||||
|
||||
} forEach _fuelCans;
|
||||
|
||||
s_player_fillfuel = -1;
|
||||
TradeInprogress = false;
|
||||
@@ -2,7 +2,7 @@
|
||||
DayZ Base Building
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_isBuilding","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_buildings","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole"];
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -12,6 +12,9 @@ _isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
_cancel = false;
|
||||
_reason = "";
|
||||
_canBuildOnPlot = false;
|
||||
DZE_BuildingZ = 0;
|
||||
|
||||
DZE_5 = false;
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
@@ -21,6 +24,7 @@ if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = f
|
||||
|
||||
_item = _this;
|
||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||
_classnametmp = _classname;
|
||||
_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
|
||||
@@ -35,7 +39,6 @@ if(_isPole) then {
|
||||
_distance = 45;
|
||||
};
|
||||
|
||||
|
||||
// check for near plot
|
||||
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
|
||||
_findNearestPole = [];
|
||||
@@ -54,9 +57,8 @@ if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText ["C
|
||||
if(_IsNearPlot == 0) then {
|
||||
_canBuildOnPlot = true;
|
||||
} else {
|
||||
// Since there are plots nearby we check for ownership and then for friend status
|
||||
|
||||
if("Plastic_Pole_EP1_DZ" in _needNearby) then {
|
||||
// check nearby plots ownership and then for friend status
|
||||
_nearestPole = _findNearestPole select 0;
|
||||
|
||||
// Find owner
|
||||
@@ -66,24 +68,14 @@ if(_IsNearPlot == 0) then {
|
||||
|
||||
// check if friendly to owner
|
||||
if(dayz_characterID == _ownerID) then {
|
||||
// owner can build anything within his plot except other plots
|
||||
if(!_isPole) then {
|
||||
_canBuildOnPlot = true;
|
||||
};
|
||||
|
||||
} else {
|
||||
// disallow building plot
|
||||
if(!_isPole) then {
|
||||
_friendlies = player getVariable ["friendlyTo",[]];
|
||||
// check if friendly to owner
|
||||
if(_ownerID in _friendlies) then {
|
||||
_canBuildOnPlot = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_canBuildOnPlot = true;
|
||||
};
|
||||
};
|
||||
|
||||
// _message
|
||||
@@ -103,75 +95,118 @@ if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["Missi
|
||||
if (_hasrequireditem) then {
|
||||
|
||||
_location = [0,0,0];
|
||||
_dir = getDir player;
|
||||
|
||||
player allowDamage false;
|
||||
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), 0];
|
||||
|
||||
|
||||
if(isText (configFile >> "CfgVehicles" >> _classname >> "GhostPreview")) then {
|
||||
_ghost = getText(configFile >> "CfgVehicles" >> _classname >> "GhostPreview");
|
||||
};
|
||||
|
||||
// if ghost preview available use that instead
|
||||
if(_ghost != "") then {
|
||||
|
||||
_classnametmp = _classname;
|
||||
_classname = _ghost;
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_classname = _classnametmp;
|
||||
|
||||
} else {
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
|
||||
_object setDir _dir;
|
||||
|
||||
_object setPos _position;
|
||||
|
||||
_object allowDamage false;
|
||||
|
||||
_object attachTo [player];
|
||||
|
||||
_counter = 0;
|
||||
_isOk = true;
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
if (player getVariable["combattimeout", 0] >= time) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Cannot build while in combat.";
|
||||
|
||||
|
||||
if(_counter == 0) then {
|
||||
// get inital players position
|
||||
_location1 = getPosATL player;
|
||||
_dir = getDir player;
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), (_position select 2)];
|
||||
hintSilent str (_position);
|
||||
|
||||
// if ghost preview available use that instead
|
||||
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
||||
if (_ghost == "") then {
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
} else {
|
||||
_classname = _ghost;
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
|
||||
cutText ["Planning construction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
_object setDir _dir;
|
||||
_object setPos _position;
|
||||
_object attachTo [player];
|
||||
};
|
||||
|
||||
_zheightchanged = false;
|
||||
|
||||
if (DZE_Q) then {
|
||||
DZE_Q = false;
|
||||
DZE_BuildingZ = DZE_BuildingZ + 0.1;
|
||||
_zheightchanged = true;
|
||||
};
|
||||
if (DZE_Z) then {
|
||||
DZE_Z = false;
|
||||
DZE_BuildingZ = DZE_BuildingZ - 0.1;
|
||||
|
||||
_zheightchanged = true;
|
||||
};
|
||||
|
||||
if(_zheightchanged) then {
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
|
||||
_dir = getDir player;
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), (_position select 2)+DZE_BuildingZ];
|
||||
|
||||
hintSilent str (_position);
|
||||
|
||||
// if ghost preview available use that instead
|
||||
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
|
||||
if (_ghost == "") then {
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
} else {
|
||||
_classname = _ghost;
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
};
|
||||
|
||||
_object setDir _dir;
|
||||
_object setPos _position;
|
||||
_object attachTo [player];
|
||||
};
|
||||
|
||||
cutText ["Planning construction numpad 8 = up, numpad 2 = down, and numpad 5 to start building.", "PLAIN DOWN"];
|
||||
|
||||
_location0 = getPosATL player;
|
||||
|
||||
sleep 1;
|
||||
|
||||
_location1 = getPosATL player;
|
||||
sleep 5;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 < 0.1) exitWith {
|
||||
if(DZE_5) exitWith {
|
||||
_isOk = false;
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
|
||||
if(_location1 distance _location2 > 5) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Moving to fast.";
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
|
||||
if(_counter >= 3) exitWith {
|
||||
if(_counter >= 45) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Ran out of time to find position.";
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
|
||||
if (player getVariable["combattimeout", 0] >= time) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Cannot build while in combat.";
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
_classname = _classnametmp;
|
||||
|
||||
|
||||
|
||||
|
||||
// Start Build
|
||||
@@ -183,30 +218,18 @@ if (_hasrequireditem) then {
|
||||
// Get position based on player
|
||||
_location = player modeltoworld _offset;
|
||||
|
||||
_location = [(_location select 0),(_location select 1),(_position select 2)];
|
||||
|
||||
hintSilent str (_location);
|
||||
|
||||
_tmpbuilt setpos _location;
|
||||
|
||||
// No building on roads
|
||||
if (isOnRoad _location) then { _cancel = true; _reason = "Cannot build on a road."; };
|
||||
|
||||
// set building with ground
|
||||
_location = [(_location select 0),(_location select 1), 0];
|
||||
_tmpbuilt setpos _location;
|
||||
|
||||
// set building with offset
|
||||
// _tmpbuilt setpos _location;
|
||||
|
||||
player allowDamage true;
|
||||
|
||||
// testing new way of finding building
|
||||
_buildings = nearestObjects [(vehicle player), ["Building"], 100];
|
||||
{
|
||||
_isBuilding = [(vehicle player),_x] call fnc_isInsideBuilding;
|
||||
if(_isBuilding) exitWith {
|
||||
_cancel = true;
|
||||
_reason = "Cannot build inside another building.";
|
||||
};
|
||||
} forEach _buildings;
|
||||
|
||||
// No building in trader zones
|
||||
if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
|
||||
if(!placevault) then { _cancel = true; _reason = "Cannot build in a city."; };
|
||||
|
||||
if(!_cancel) then {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ TradeInprogress = true;
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
|
||||
@@ -11,7 +11,7 @@ TradeInprogress = true;
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
|
||||
@@ -11,7 +11,7 @@ TradeInprogress = true;
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
|
||||
@@ -11,7 +11,7 @@ TradeInprogress = true;
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
|
||||
@@ -11,7 +11,7 @@ TradeInprogress = true;
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
|
||||
87
SQF/dayz_code/actions/tow_AttachStraps.sqf
Normal file
87
SQF/dayz_code/actions/tow_AttachStraps.sqf
Normal file
@@ -0,0 +1,87 @@
|
||||
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_abort","_canSize","_configVeh","_capacity","_nameText","_isOk","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Tow Truck
|
||||
_towTruck = _this;
|
||||
|
||||
// Get all nearby vehicles within 10m
|
||||
_findNearestVehicles = nearestObjects [_towTruck, ["Car"], 10];
|
||||
_findNearestVehicle = [];
|
||||
{
|
||||
if (alive _x and _towTruck != _x) then {
|
||||
// within brounding box
|
||||
if([_x,_towTruck] call fnc_isInsideBuilding2) then {
|
||||
_findNearestVehicle set [(count _findNearestVehicle),_x];
|
||||
};
|
||||
};
|
||||
} foreach _findNearestVehicles;
|
||||
|
||||
_IsNearVehicle = count (_findNearestVehicle);
|
||||
|
||||
if(_IsNearVehicle >= 1) then {
|
||||
|
||||
// select the nearest one
|
||||
_vehicle = _findNearestVehicle select 0;
|
||||
|
||||
// Static vehicle fuel information
|
||||
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
|
||||
_nameText = getText(_configVeh >> "displayName");
|
||||
|
||||
// alert zombies
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
_finished = false;
|
||||
|
||||
// force animation
|
||||
player playActionNow "Medic";
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if(!_finished) then {
|
||||
r_interrupt = false;
|
||||
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
if(typeOf _towTruck == "VIL_asistvan_DZE" ) then {
|
||||
_vehicle attachTo [_towTruck];
|
||||
_towTruck setVariable ["DZEinTow", true, true];
|
||||
_towTruck setVariable ["DZEvehicleInTow", _vehicle, true];
|
||||
cutText [format["%1 has been attached to Tow Truck.",_nameText], "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
cutText ["No Vehicles Nearby.", "PLAIN DOWN"];
|
||||
};
|
||||
TradeInprogress = false;
|
||||
72
SQF/dayz_code/actions/tow_DetachStraps.sqf
Normal file
72
SQF/dayz_code/actions/tow_DetachStraps.sqf
Normal file
@@ -0,0 +1,72 @@
|
||||
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_abort","_canSize","_configVeh","_capacity","_nameText","_isOk","_findNearestVehicles","_findNearestVehicle","_IsNearVehicle"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Tow Truck
|
||||
_towTruck = _this;
|
||||
|
||||
// exit if no vehicle is in tow.
|
||||
_inTow = _towTruck getVariable ["DZEinTow", false]
|
||||
|
||||
if(!_inTow) then {
|
||||
|
||||
// select the nearest one
|
||||
_vehicle = _towTruck getVariable ["DZEvehicleInTow", false];
|
||||
|
||||
// Static vehicle fuel information
|
||||
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
|
||||
_nameText = getText(_configVeh >> "displayName");
|
||||
|
||||
// alert zombies
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
_finished = false;
|
||||
|
||||
// force animation
|
||||
player playActionNow "Medic";
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if(!_finished) then {
|
||||
r_interrupt = false;
|
||||
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
detach _vehicle;
|
||||
_towTruck setVariable ["DZEinTow", false, true];
|
||||
_towTruck setVariable ["DZEvehicleInTow", objNull, true];
|
||||
cutText [format["%1 has been dettached from Tow Truck.",_nameText], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText ["No Vehicles In Tow.", "PLAIN DOWN"];
|
||||
};
|
||||
TradeInprogress = false;
|
||||
@@ -112,6 +112,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
} forEach boil_tin_cans;
|
||||
_hasFuelE = "ItemJerrycanEmpty" in _magazinesPlayer;
|
||||
_hasFuelBarrelE = "ItemFuelBarrelEmpty" in _magazinesPlayer;
|
||||
|
||||
_itemsPlayer = items player;
|
||||
|
||||
@@ -154,7 +155,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
} forEach _rawmeat;
|
||||
|
||||
_isFuel = false;
|
||||
if (_hasFuelE) then {
|
||||
if (_hasFuelE or _hasFuelBarrelE) then {
|
||||
{
|
||||
if(_cursorTarget isKindOf _x) exitWith {_isFuel = true;};
|
||||
} forEach dayz_fuelsources;
|
||||
@@ -271,7 +272,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
|
||||
//Allow player to fill jerrycan
|
||||
if(_hasFuelE and _isFuel) then {
|
||||
if((_hasFuelE or _hasFuelBarrelE) and _isFuel) then {
|
||||
if (s_player_fillfuel < 0) then {
|
||||
s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",[], 1, false, true, "", ""];
|
||||
};
|
||||
@@ -453,7 +454,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
// show that pump needs power if no generator nearby.
|
||||
if(_IsNearRunningGen > 0) then {
|
||||
s_player_fuelauto = player addAction ["Fill Vehicle", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",[], 0, false, true, "",""];
|
||||
s_player_fuelauto = player addAction ["Fill Vehicle", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",objNull, 0, false, true, "",""];
|
||||
} else {
|
||||
s_player_fuelauto = player addAction ["<t color='#ff0000'>Needs Power</t>", "",[], 0, false, true, "",""];
|
||||
};
|
||||
@@ -463,6 +464,21 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
s_player_fuelauto = -1;
|
||||
};
|
||||
|
||||
//Fuel Pump on truck
|
||||
if(_typeOfCursorTarget in DZE_fueltruckarray and alive _cursorTarget) then {
|
||||
if (s_player_fuelauto2 < 0) then {
|
||||
// show that fuel truck pump needs power.
|
||||
if(isEngineOn _cursorTarget) then {
|
||||
s_player_fuelauto2 = player addAction ["Fill Vehicle", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
} else {
|
||||
s_player_fuelauto2 = player addAction ["<t color='#ff0000'>Needs Power</t>", "",[], 0, false, true, "",""];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_fuelauto2;
|
||||
s_player_fuelauto2 = -1;
|
||||
};
|
||||
|
||||
//Start Generator
|
||||
if(_cursorTarget isKindOf "Generator_DZ") then {
|
||||
if (s_player_fillgen < 0) then {
|
||||
@@ -486,6 +502,21 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
s_player_fillgen = -1;
|
||||
};
|
||||
|
||||
//Towing with tow truck
|
||||
if(_typeOfCursorTarget == "VIL_asistvan_DZE") then {
|
||||
if (s_player_towing < 0) then {
|
||||
if(!(_cursorTarget getVariable ["DZEinTow", false])) then {
|
||||
s_player_towing = player addAction ["Attach Straps", "\z\addons\dayz_code\actions\tow_AttachStraps.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
} else {
|
||||
s_player_towing = player addAction ["Dettach Straps", "\z\addons\dayz_code\actions\tow_DetachStraps.sqf",_cursorTarget, 0, false, true, "",""];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
player removeAction s_player_towing;
|
||||
s_player_towing = -1;
|
||||
};
|
||||
|
||||
|
||||
//Sleep
|
||||
if(_isTent and _ownerID == dayz_characterID) then {
|
||||
if ((s_player_sleep < 0) and (player distance _cursorTarget < 3)) then {
|
||||
@@ -693,8 +724,12 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
s_player_information = -1;
|
||||
player removeAction s_player_fillgen;
|
||||
s_player_fillgen = -1;
|
||||
player removeAction s_player_towing;
|
||||
s_player_towing = -1;
|
||||
player removeAction s_player_fuelauto;
|
||||
s_player_fuelauto = -1;
|
||||
player removeAction s_player_fuelauto2;
|
||||
s_player_fuelauto2 = -1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_sound","_num","_length","_pause"];
|
||||
while {!r_player_dead} do {
|
||||
_num = round(random 35);
|
||||
_num = floor(random 36);
|
||||
_sound = "z_suspense_" + str(_num);
|
||||
_length = getNumber(configFile >> "cfgMusic" >> _sound >> "Duration");
|
||||
_pause = ((random 5) + 2) + _length;
|
||||
|
||||
@@ -85,9 +85,8 @@ if (_vehicle != player) then {
|
||||
private[];
|
||||
_tPos = (getPosASL _vehicle);
|
||||
_zPos = (getPosASL _unit);
|
||||
_onSameFloor = ((abs((_tPos select 2) - (_tPos select 2)) < 1.3));
|
||||
_inAngle = [_zPos,(getdir _unit),50,_tPos] call fnc_inAngleSector;
|
||||
if (_onSameFloor and _inAngle) then {
|
||||
if (_inAngle) then {
|
||||
//LOS check
|
||||
_cantSee = [_unit,_vehicle] call dayz_losCheck;
|
||||
if (!_cantSee) then {
|
||||
|
||||
@@ -41,7 +41,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzepoch.com";
|
||||
version = "1.0.1.6";
|
||||
version = "1.0.1.7";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
|
||||
@@ -307,6 +307,18 @@ if (!isDedicated) then {
|
||||
dayz_lastCheckBit = time;
|
||||
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
|
||||
};
|
||||
//
|
||||
if (_dikCode == 0x48) then {
|
||||
DZE_Q = true;
|
||||
};
|
||||
if (_dikCode == 0x50) then {
|
||||
DZE_Z = true;
|
||||
};
|
||||
if (_dikCode == 0x4C) then {
|
||||
DZE_5 = true;
|
||||
};
|
||||
|
||||
|
||||
if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (time - dayz_lastCheckBit > 10)) then {
|
||||
dayz_lastCheckBit = time;
|
||||
call dayz_forceSave;
|
||||
|
||||
@@ -235,7 +235,9 @@ dayz_resetSelfActions = {
|
||||
s_player_repair_crtl = -1;
|
||||
s_player_information = -1;
|
||||
s_player_fuelauto = -1;
|
||||
s_player_fuelauto2 = -1;
|
||||
s_player_fillgen = -1;
|
||||
s_player_towing = -1;
|
||||
};
|
||||
call dayz_resetSelfActions;
|
||||
|
||||
@@ -450,6 +452,7 @@ DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ"
|
||||
|
||||
// These work with just a running generator
|
||||
dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"];
|
||||
DZE_fueltruckarray = ["KamazRefuel_DZ","UralRefuel_TK_EP1_DZ","MtvrRefuel_DES_EP1_DZ","V3S_Refuel_TK_GUE_EP1_DZ"];
|
||||
|
||||
// Standard Fuel sources
|
||||
dayz_fuelsources = ["Land_Ind_TankSmall","Land_fuel_tank_big","Land_fuel_tank_stairs","Land_fuel_tank_stairs_ep1","Land_wagon_tanker","Land_fuelstation","Land_fuelstation_army","land_fuelstation_w","Land_benzina_schnell"];
|
||||
@@ -579,5 +582,8 @@ if(!isDedicated) then {
|
||||
};
|
||||
|
||||
DZE_CanPickup = true;
|
||||
DZE_Q = false;
|
||||
DZE_Z = false;
|
||||
DZE_5 = false;
|
||||
|
||||
};
|
||||
@@ -11,11 +11,15 @@ if (isServer) then {
|
||||
//Send request
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
#ifdef DZE_SERVER_DEBUG_HIVE
|
||||
diag_log format["DELETE: Deleted by ID: %1",_id];
|
||||
#endif
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
#ifdef DZE_SERVER_DEBUG_HIVE
|
||||
diag_log format["DELETE: Deleted by UID: %1",_uid];
|
||||
#endif
|
||||
};
|
||||
};
|
||||
@@ -1,6 +1,3 @@
|
||||
/*
|
||||
|
||||
*/
|
||||
private ["_object","_myGroup","_id","_playerID","_playerName","_characterID","_playerIDtoarray","_timeout"];
|
||||
_playerID = _this select 0;
|
||||
_playerName = _this select 1;
|
||||
@@ -19,26 +16,30 @@ if (59 in _playerIDtoarray) exitWith { };
|
||||
|
||||
if ((_timeout - time) > 0) then {
|
||||
|
||||
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
|
||||
_object setVariable["NORRN_unconscious",true, true];
|
||||
_object setVariable["unconsciousTime",300,true];
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
|
||||
diag_log format["SET UNCONCIOUSNESS: %1", _playerName];
|
||||
#endif
|
||||
|
||||
//_message = format["PLAYER COMBAT LOGGED: %1 (%2)",_playerName, _killerName, _weapon];
|
||||
//[nil, nil, rspawn, [_object, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
|
||||
|
||||
// Message whole server when player combat logs
|
||||
_message = format["PLAYER COMBAT LOGGED: %1",_playerName];
|
||||
[nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log format["DISCONNECT: %1 (%2) Object: %3, _characterID: %4", _playerName,_playerID,_object,_characterID];
|
||||
#endif
|
||||
|
||||
_id = [_playerID,_characterID,2] spawn dayz_recordLogin;
|
||||
dayz_disco = dayz_disco - [_playerID];
|
||||
if (!isNull _object) then {
|
||||
//Update Vehicle
|
||||
//Update Vehicle
|
||||
{ [_x,"gear"] call server_updateObject } foreach
|
||||
(nearestObjects [getPosATL _object, dayz_updateObjects, 10]);
|
||||
if (alive _object) then {
|
||||
[_object,(magazines _object),true,true] call server_playerSync;
|
||||
//[_object,[],true,false] call server_playerSync;
|
||||
_myGroup = group _object;
|
||||
deleteVehicle _object;
|
||||
deleteGroup _myGroup;
|
||||
|
||||
@@ -3,9 +3,10 @@ private["_character","_clientID"];
|
||||
_character = _this select 0;
|
||||
_clientID = owner _character;
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("HIVE: Player Death list Request by ClientID: "+ str(_clientID));
|
||||
|
||||
diag_log(PlayerDeaths);
|
||||
#endif
|
||||
|
||||
dayzPlayerDeathsResult = PlayerDeaths;
|
||||
|
||||
|
||||
@@ -33,7 +33,10 @@ if (_killerName != "nil") then
|
||||
_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PKILL
|
||||
diag_log _loc_message;
|
||||
#endif
|
||||
|
||||
if(DZE_DeathMsgGlobal) then {
|
||||
[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
|
||||
};
|
||||
@@ -57,13 +60,6 @@ if (_killerName != "nil") then
|
||||
dayz_disco = dayz_disco - [_playerID];
|
||||
_newObject setVariable["processedDeath",time];
|
||||
|
||||
/*
|
||||
diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
if (isnil "_characterID") then {
|
||||
diag_log ("DW_DEBUG: _newObject: " + str(_newObject));
|
||||
};
|
||||
*/
|
||||
|
||||
if (typeName _minutes == "STRING") then
|
||||
{
|
||||
_minutes = parseNumber _minutes;
|
||||
@@ -72,7 +68,9 @@ if (typeName _minutes == "STRING") then
|
||||
if (_characterID != "0") then
|
||||
{
|
||||
_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
|
||||
//diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
#ifdef DZE_SERVER_DEBUG_HIVE
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
#endif
|
||||
_key call server_hiveWrite;
|
||||
}
|
||||
else
|
||||
@@ -80,16 +78,6 @@ else
|
||||
deleteVehicle _newObject;
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PKILL
|
||||
diag_log ("PDEATH: Player Died " + _playerID);
|
||||
/*
|
||||
_eh = [_newObject] spawn {
|
||||
_body = _this select 0;
|
||||
_method = _body getVariable["deathType","unknown"];
|
||||
_name = _body getVariable["bodyName","unknown"];
|
||||
waitUntil{!isPlayer _body;sleep 1};
|
||||
_body setVariable["deathType",_method,true];
|
||||
_body setVariable["bodyName",_name,true];
|
||||
diag_log ("PDEATH: Player Left Body " + _name);
|
||||
};
|
||||
*/
|
||||
//dead_bodyCleanup set [count dead_bodyCleanup,_newObject];
|
||||
#endif
|
||||
@@ -1,20 +1,20 @@
|
||||
private ["_isInfected","_doLoop","_hiveVer","_isHiveOk","_playerID","_playerObj","_primary","_key","_charID","_playerName","_backpack","_isNew","_inventory","_survival","_model","_mags","_wpns","_bcpk","_config","_newPlayer"];
|
||||
//Set Variables
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("STARTING LOGIN: " + str(_this));
|
||||
#endif
|
||||
|
||||
_playerID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerName = name _playerObj;
|
||||
//_worldspace = [];
|
||||
|
||||
if (_playerName == '__SERVER__' || _playerID == '' || local player) exitWith {};
|
||||
|
||||
// Cancel any login until server_monitor terminates.
|
||||
// This is mandatory since all vehicles must be spawned before the first players spawn on the map.
|
||||
// Otherwise, all vehicle event handlers won't be created on players' client side.
|
||||
if (isNil "sm_done") exitWith { diag_log ("Login cancelled, server is not ready. " + str(_playerObj)); };
|
||||
|
||||
if (isNil "sm_done") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("Login cancelled, server is not ready. " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
if (count _this > 2) then {
|
||||
dayz_players = dayz_players - [_this select 2];
|
||||
@@ -23,29 +23,23 @@ if (count _this > 2) then {
|
||||
//Variables
|
||||
_inventory = [];
|
||||
_backpack = [];
|
||||
//_items = [];
|
||||
//_magazines = [];
|
||||
//_weapons = [];
|
||||
//_medicalStats = [];
|
||||
_survival = [0,0,0];
|
||||
//_tent = [];
|
||||
//_state = [];
|
||||
//_direction = 0;
|
||||
_isInfected = 0;
|
||||
_model = "";
|
||||
//_newUnit = objNull;
|
||||
//_botActive = false;
|
||||
|
||||
if (_playerID == "") then {
|
||||
_playerID = getPlayerUID _playerObj;
|
||||
};
|
||||
|
||||
if ((_playerID == "") or (isNil "_playerID")) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
|
||||
#endif
|
||||
};
|
||||
|
||||
//??? endLoadingScreen;
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
|
||||
#endif
|
||||
|
||||
//Do Connection Attempt
|
||||
_doLoop = 0;
|
||||
@@ -61,20 +55,25 @@ while {_doLoop < 5} do {
|
||||
};
|
||||
|
||||
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("LOGIN RESULT: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
if ((_primary select 0) == "ERROR") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log format ["LOGIN RESULT: Exiting, failed to load _primary: %1 for player: %2 ",_primary,_playerID];
|
||||
#endif
|
||||
};
|
||||
|
||||
//Process request
|
||||
_newPlayer = _primary select 1;
|
||||
_isNew = count _primary < 7; //_result select 1;
|
||||
_charID = _primary select 2;
|
||||
//_randomSpot = false;
|
||||
|
||||
//diag_log ("LOGIN RESULT: " + str(_primary));
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN RESULT: " + str(_primary));
|
||||
#endif
|
||||
|
||||
/* PROCESS */
|
||||
_hiveVer = 0;
|
||||
@@ -127,16 +126,15 @@ if (!_isNew) then {
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
};
|
||||
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
|
||||
_isHiveOk = false; //EDITED
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
#endif
|
||||
|
||||
_isHiveOk = false;
|
||||
if (_hiveVer >= dayz_hiveVersionNo) then {
|
||||
_isHiveOk = true;
|
||||
};
|
||||
//diag_log ("SERVER RESULT: " + str("X") + " " + str(dayz_hiveVersionNo));
|
||||
|
||||
//Server publishes variable to clients and WAITS
|
||||
//_playerObj setVariable ["publish",[_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer],true];
|
||||
|
||||
dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected];
|
||||
if(!isNull _playerObj) then {
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_lastinstance","_friendlies","_randomSpot","_position","_debug","_distance","_hit","_fractures","_score","_findSpot","_pos","_isIsland","_w","_clientID","_spawnMC"];
|
||||
//Wait for HIVE to be free
|
||||
//diag_log ("SETUP: attempted with " + str(_this));
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: attempted with " + str(_this));
|
||||
#endif
|
||||
|
||||
_characterID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerID = getPlayerUID _playerObj;
|
||||
|
||||
if (isNull _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Add MPHit event handler
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log("Adding MPHit EH for " + str(_playerObj));
|
||||
#endif
|
||||
_playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];
|
||||
|
||||
if (_playerID == "") then {
|
||||
@@ -19,13 +25,17 @@ if (_playerID == "") then {
|
||||
};
|
||||
|
||||
if (_playerID == "") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, no player ID: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
private["_dummy"];
|
||||
_dummy = getPlayerUID _playerObj;
|
||||
if ( _playerID != _dummy ) then {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
|
||||
#endif
|
||||
_playerID = _dummy;
|
||||
};
|
||||
|
||||
@@ -48,11 +58,15 @@ while {_doLoop < 5} do {
|
||||
};
|
||||
|
||||
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP RESULT: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Wait for HIVE to be free
|
||||
//diag_log ("SETUP: RESULT: Successful with " + str(_primary));
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: RESULT: Successful with " + str(_primary));
|
||||
#endif
|
||||
|
||||
_medical = _primary select 1;
|
||||
_stats = _primary select 2;
|
||||
@@ -62,14 +76,11 @@ _humanity = _primary select 5;
|
||||
_lastinstance = _primary select 6;
|
||||
|
||||
_namespace = profileNamespace;
|
||||
|
||||
_friendlies = _namespace getVariable ["friendlies", []];;
|
||||
|
||||
//Set position
|
||||
_randomSpot = false;
|
||||
|
||||
//diag_log ("WORLDSPACE: " + str(_worldspace));
|
||||
|
||||
if (count _worldspace > 0) then {
|
||||
|
||||
_position = _worldspace select 1;
|
||||
@@ -98,7 +109,9 @@ if (count _worldspace > 0) then {
|
||||
_randomSpot = true;
|
||||
};
|
||||
|
||||
//diag_log ("LOGIN: Location: " + str(_worldspace) + " doRnd?: " + str(_randomSpot));
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN: Location: " + str(_worldspace) + " doRnd?: " + str(_randomSpot));
|
||||
#endif
|
||||
|
||||
//set medical values
|
||||
if (count _medical > 0) then {
|
||||
@@ -110,16 +123,8 @@ if (count _medical > 0) then {
|
||||
_playerObj setVariable["USEC_isCardiac",(_medical select 5),true];
|
||||
_playerObj setVariable["USEC_lowBlood",(_medical select 6),true];
|
||||
_playerObj setVariable["USEC_BloodQty",(_medical select 7),true];
|
||||
|
||||
_playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
|
||||
// if (_playerID in dayz_disco) then {
|
||||
// _playerObj setVariable["NORRN_unconscious",true, true];
|
||||
// _playerObj setVariable["unconsciousTime",300,true];
|
||||
// } else {
|
||||
// _playerObj setVariable["unconsciousTime",(_medical select 10),true];
|
||||
// };
|
||||
|
||||
//Add Wounds
|
||||
{
|
||||
_playerObj setVariable[_x,true,true];
|
||||
@@ -192,7 +197,6 @@ if (_randomSpot) then {
|
||||
endLoadingScreen;
|
||||
};
|
||||
|
||||
|
||||
//Spawn modify via mission init.sqf
|
||||
if(isnil "spawnArea") then {
|
||||
spawnArea = 1500;
|
||||
@@ -240,7 +244,6 @@ if (_randomSpot) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//Record player for management
|
||||
dayz_players set [count dayz_players,_playerObj];
|
||||
|
||||
@@ -263,9 +266,9 @@ if(!isNull _playerObj) then {
|
||||
_playerObj setVariable ["lastTime",time];
|
||||
//_playerObj setVariable ["model_CHK",typeOf _playerObj];
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
#endif
|
||||
|
||||
dayzLogin = null;
|
||||
dayzLogin2 = null;
|
||||
|
||||
//Save Login
|
||||
|
||||
@@ -1,21 +1,4 @@
|
||||
private ["_character","_magazines","_force","_characterID","_charPos","_isInVehicle","_timeSince","_humanity","_debug","_distance","_isNewMed","_isNewPos","_isNewGear","_playerPos","_playerGear","_playerBackp","_medical","_distanceFoot","_lastPos","_backpack","_kills","_killsB","_killsH","_headShots","_lastTime","_timeGross","_timeLeft","_currentWpn","_currentAnim","_config","_onLadder","_isTerminal","_currentModel","_modelChk","_muzzles","_temp","_currentState","_array","_key","_pos","_forceGear"];
|
||||
//[player,array]
|
||||
//diag_log ("UPDATE: " + str(_this) );
|
||||
|
||||
//waituntil {(typeName(_this) == "ARRAY");sleep 0.01;}; //seems to cause often infinite waits (but not for first n players)
|
||||
|
||||
//this only happens when we don't follow the correct parameter format...
|
||||
//(like supplying just the player object instead of the array in player_eat.sqf)
|
||||
//i've fixed this in player_eat so i can comment this part out
|
||||
/*if ( typeName(_this) == "OBJECT" ) then {
|
||||
_this = [_this,[],true];
|
||||
//diag_log ("DW_DEBUG: #manual fix _this: " + str(_this));
|
||||
};*/
|
||||
|
||||
//correct
|
||||
//"UPDATE: [B 1-1-B:1 (THE BEAST) REMOTE,[],true]"
|
||||
//error
|
||||
//"UPDATE: B 1-1-B:1 (THE BEAST) REMOTE"
|
||||
|
||||
_character = _this select 0;
|
||||
_magazines = _this select 1;
|
||||
@@ -29,30 +12,35 @@ _isInVehicle = vehicle _character != _character;
|
||||
_timeSince = 0;
|
||||
_humanity = 0;
|
||||
|
||||
//diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
/*
|
||||
if !(isnil "_characterID") then {
|
||||
diag_log ("DW_DEBUG: _characterID: " + str(_characterID));
|
||||
};
|
||||
*/
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
#endif
|
||||
|
||||
if (_character isKindOf "Animal") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " is an Animal class");
|
||||
#endif
|
||||
};
|
||||
|
||||
if (isnil "_characterID") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " has nil characterID");
|
||||
#endif
|
||||
};
|
||||
|
||||
if (_characterID == "0") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " as no characterID");
|
||||
#endif
|
||||
};
|
||||
|
||||
private["_debug","_distance"];
|
||||
_debug = getMarkerpos "respawn_west";
|
||||
_distance = _debug distance _charPos;
|
||||
if (_distance < 2000) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log format["ERROR: server_playerSync: Cannot Sync Player %1 [%2]. Position in debug! %3",name _character,_characterID,_charPos];
|
||||
#endif
|
||||
};
|
||||
|
||||
//Check for server initiated updates
|
||||
@@ -60,8 +48,6 @@ _isNewMed = _character getVariable["medForceUpdate",false]; //Med Update is fo
|
||||
_isNewPos = _character getVariable["posForceUpdate",false]; //Med Update is forced when a player receives some kind of med incident
|
||||
_isNewGear = (count _magazines) > 0;
|
||||
|
||||
//diag_log ("Starting Save... MED: " + str(_isNewMed) + " / POS: " + str(_isNewPos)); sleep 0.05;
|
||||
|
||||
//Check for player initiated updates
|
||||
if (_characterID != "0") then {
|
||||
_playerPos = [];
|
||||
|
||||
@@ -10,15 +10,24 @@ diag_log("EPOCH EVENTS INIT");
|
||||
EventSchedulerLastTime = "";
|
||||
|
||||
epoch_eventIsAny = {
|
||||
private ["_boolReturn","_event","_real"];
|
||||
private ["_boolReturn","_event","_date"];
|
||||
_event = _this select 0;
|
||||
_real = _this select 1;
|
||||
_date = _this select 1;
|
||||
|
||||
_boolReturn = false;
|
||||
if (typeName _event == "STRING") then {
|
||||
_boolReturn = (_event == "any");
|
||||
|
||||
_index = 0;
|
||||
{
|
||||
_bool = false;
|
||||
if (typeName _x == "STRING") then {
|
||||
_boolReturn = true;
|
||||
} else {
|
||||
_boolReturn = (_real == _event);
|
||||
_boolReturn = ((_date select _index) == _x);
|
||||
};
|
||||
if (!_boolReturn) exitWith {};
|
||||
_index = _index + 1;
|
||||
} forEach _event;
|
||||
|
||||
_boolReturn
|
||||
};
|
||||
|
||||
@@ -36,41 +45,28 @@ while {true} do {
|
||||
_datestr = str(_date);
|
||||
if (EventSchedulerLastTime != _datestr) then {
|
||||
|
||||
// This is only ran every minute.
|
||||
// Once a minute.
|
||||
EventSchedulerLastTime = _datestr;
|
||||
|
||||
// diag_log ("EVENTS: Local Time is: " + str(_date));
|
||||
diag_log ("EVENTS: Local Time is: " + _datestr);
|
||||
{
|
||||
if([(_x select 0),(date select 0)] call epoch_eventIsAny) then {
|
||||
if([(_x select 1),(date select 1)] call epoch_eventIsAny) then {
|
||||
if([(_x select 2),(date select 2)] call epoch_eventIsAny) then {
|
||||
if([(_x select 3),(date select 3)] call epoch_eventIsAny) then {
|
||||
if([(_x select 4),(date select 4)] call epoch_eventIsAny) then {
|
||||
// EXECUTE SCRIPT
|
||||
diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + EventSchedulerLastTime);
|
||||
if([[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4)],_date] call epoch_eventIsAny) then {
|
||||
diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + _datestr);
|
||||
_handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach EpochEvents;
|
||||
|
||||
_time = diag_tickTime;
|
||||
|
||||
// perform cleanup here
|
||||
if ((_time - zero_cleanDead) > 600) then
|
||||
{
|
||||
if ((_time - zero_cleanDead) > 600) then {
|
||||
call server_cleanDead;
|
||||
zero_cleanDead = _time;
|
||||
};
|
||||
|
||||
if ((_time - zero_cleanLoot) > 1800) then
|
||||
{
|
||||
if ((_time - zero_cleanLoot) > 1800) then {
|
||||
call server_cleanLoot;
|
||||
zero_cleanLoot = _time;
|
||||
};
|
||||
};
|
||||
};
|
||||
sleep 5;
|
||||
sleep 10;
|
||||
};
|
||||
@@ -1,5 +1,8 @@
|
||||
private["_unit"];
|
||||
_unit = _this select 0;
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("CLEANUP: DELETE UNCONTROLLED ZOMBIE: " + (typeOf _unit) + " OF: " + str(_unit) );
|
||||
#endif
|
||||
|
||||
deleteVehicle _unit;
|
||||
@@ -1,3 +1,9 @@
|
||||
#define DZE_SERVER_DEBUG
|
||||
#define DZE_SERVER_DEBUG_HIVE
|
||||
#define DZE_SERVER_DEBUG_PKILL
|
||||
#define DZE_SERVER_DEBUG_LOGIN
|
||||
#define DZE_SERVER_DEBUG_PSETUP
|
||||
|
||||
class CfgPatches {
|
||||
class dayz_server {
|
||||
units[] = {};
|
||||
|
||||
@@ -347,33 +347,7 @@ spawn_roadblocks = {
|
||||
_veh setDir round(random 360);
|
||||
_veh setpos _position;
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_veh];
|
||||
_veh setVariable ["ObjectID","1",true];
|
||||
|
||||
_num = round(random 3);
|
||||
_config = configFile >> "CfgBuildingLoot" >> _spawnloot;
|
||||
_itemType = [] + getArray (_config >> "itemType");
|
||||
_itemChance = [] + getArray (_config >> "itemChance");
|
||||
|
||||
waituntil {!isnil "fnc_buildWeightedArray"};
|
||||
|
||||
_weights = [];
|
||||
_weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
|
||||
for "_x" from 1 to _num do {
|
||||
//create loot
|
||||
_index = _weights call BIS_fnc_selectRandom;
|
||||
sleep 1;
|
||||
if (count _itemType > _index) then {
|
||||
_iArray = _itemType select _index;
|
||||
_iArray set [2,_position];
|
||||
_iArray set [3,5];
|
||||
_iArray call spawn_loot;
|
||||
_nearby = _position nearObjects ["WeaponHolder",20];
|
||||
{
|
||||
_x setVariable ["permaLoot",true];
|
||||
} forEach _nearBy;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -4,49 +4,39 @@
|
||||
item0[] = {"init",0,250,-75.000000,-400.000000,25.000000,-350.000000,0.000000,"init"};
|
||||
item1[] = {"true",8,218,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"true"};
|
||||
item2[] = {"waiting",2,250,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"waiting"};
|
||||
item3[] = {"too_many_dead",4,218,-150.000000,-25.000000,-50.000000,25.000000,2.000000,"too many" \n "dead"};
|
||||
item4[] = {"cleanup_dead",2,250,-150.000000,50.000000,-50.000000,100.000000,0.000000,"cleanup" \n "dead"};
|
||||
item5[] = {"too_many_objects",4,218,-25.000000,-25.000000,75.000000,25.000000,0.000000,"too many" \n "objects"};
|
||||
item6[] = {"cleanup_objects",2,250,-25.000000,50.000000,75.000000,100.000000,0.000000,"cleanup" \n "objects"};
|
||||
item7[] = {"time_sync",4,218,-275.000000,-25.000000,-175.000000,25.000000,1.000000,"time" \n "sync"};
|
||||
item8[] = {"sync_the_time",2,250,-275.000000,50.000000,-175.000000,100.000000,0.000000,"sync" \n "the time"};
|
||||
item9[] = {"true",8,218,-75.000000,125.000000,25.000000,175.000000,0.000000,"true"};
|
||||
item10[] = {"general_cleanup",2,4346,-75.000000,200.000000,25.000000,250.000000,0.000000,"general" \n "cleanup"};
|
||||
item11[] = {"",7,210,-304.000000,220.999985,-296.000000,229.000015,0.000000,""};
|
||||
item12[] = {"",7,210,-304.000000,-154.000000,-296.000000,-146.000000,0.000000,""};
|
||||
item13[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
|
||||
item14[] = {"",7,210,221.000000,146.000000,229.000000,154.000000,0.000000,""};
|
||||
item15[] = {"initialized",4,218,-75.000000,-325.000000,25.000000,-275.000000,0.000000,"initialized"};
|
||||
item16[] = {"prepare",2,250,-75.000000,-250.000000,25.000000,-200.000000,0.000000,"prepare"};
|
||||
item17[] = {"update_objects",2,250,100.000000,50.000000,200.000000,100.000000,0.000000,"update objects"};
|
||||
item18[] = {"need_update",4,218,100.000000,-25.000000,200.000000,25.000000,1.000000,"need update"};
|
||||
item19[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
|
||||
link0[] = {0,15};
|
||||
item3[] = {"time_sync",4,218,-275.000000,-25.000000,-175.000000,25.000000,1.000000,"time" \n "sync"};
|
||||
item4[] = {"sync_the_time",2,250,-275.000000,50.000000,-175.000000,100.000000,0.000000,"sync" \n "the time"};
|
||||
item5[] = {"true",8,218,-75.000000,125.000000,25.000000,175.000000,0.000000,"true"};
|
||||
item6[] = {"general_cleanup",2,4346,-75.000000,200.000000,25.000000,250.000000,0.000000,"general" \n "cleanup"};
|
||||
item7[] = {"",7,210,-304.000000,220.999985,-296.000000,229.000015,0.000000,""};
|
||||
item8[] = {"",7,210,-304.000000,-154.000000,-296.000000,-146.000000,0.000000,""};
|
||||
item9[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
|
||||
item10[] = {"",7,210,221.000000,146.000000,229.000000,154.000000,0.000000,""};
|
||||
item11[] = {"initialized",4,218,-75.000000,-325.000000,25.000000,-275.000000,0.000000,"initialized"};
|
||||
item12[] = {"prepare",2,250,-75.000000,-250.000000,25.000000,-200.000000,0.000000,"prepare"};
|
||||
item13[] = {"update_objects",2,250,100.000000,50.000000,200.000000,100.000000,0.000000,"update objects"};
|
||||
item14[] = {"need_update",4,218,100.000000,-25.000000,200.000000,25.000000,1.000000,"need update"};
|
||||
item15[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
|
||||
link0[] = {0,11};
|
||||
link1[] = {1,2};
|
||||
link2[] = {2,3};
|
||||
link3[] = {2,5};
|
||||
link4[] = {2,7};
|
||||
link5[] = {2,13};
|
||||
link6[] = {2,18};
|
||||
link7[] = {3,4};
|
||||
link8[] = {4,9};
|
||||
link9[] = {5,6};
|
||||
link10[] = {6,9};
|
||||
link11[] = {7,8};
|
||||
link12[] = {8,9};
|
||||
link13[] = {9,10};
|
||||
link14[] = {10,11};
|
||||
link15[] = {11,12};
|
||||
link16[] = {12,1};
|
||||
link17[] = {13,14};
|
||||
link18[] = {13,19};
|
||||
link19[] = {14,9};
|
||||
link20[] = {15,16};
|
||||
link21[] = {16,1};
|
||||
link22[] = {17,9};
|
||||
link23[] = {18,17};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,24,6316128,1,-378.181000,335.872437,502.526184,-187.229050,911,880,1};
|
||||
window[] = {2,-1,-1,-1,-1,936,156,1485,156,3,929};
|
||||
link3[] = {2,9};
|
||||
link4[] = {2,14};
|
||||
link5[] = {3,4};
|
||||
link6[] = {4,5};
|
||||
link7[] = {5,6};
|
||||
link8[] = {6,7};
|
||||
link9[] = {7,8};
|
||||
link10[] = {8,1};
|
||||
link11[] = {9,10};
|
||||
link12[] = {9,15};
|
||||
link13[] = {10,5};
|
||||
link14[] = {11,12};
|
||||
link15[] = {12,1};
|
||||
link16[] = {13,5};
|
||||
link17[] = {14,13};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,24,6316128,1,-419.782135,377.473389,490.440002,-241.733459,910,880,1};
|
||||
window[] = {2,-1,-1,-1,-1,784,1706,2984,26,3,928};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
@@ -79,19 +69,19 @@ class FSM
|
||||
{
|
||||
name = "waiting";
|
||||
init = /*%FSM<STATEINIT""">*/"//diag_log ""CLEANUP: Waiting for next task"";" \n
|
||||
"_numDead = {local _x} count allDead;" \n
|
||||
"//_numDead = {local _x} count allDead;" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "too_many_dead">*/
|
||||
class too_many_dead
|
||||
/*%FSM<LINK "need_update">*/
|
||||
class need_update
|
||||
{
|
||||
priority = 2.000000;
|
||||
to="cleanup_dead";
|
||||
priority = 1.000000;
|
||||
to="update_objects";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"(_numDead > 300)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"( (count needUpdate_objects) > 0 && (diag_tickTime -_lastNeedUpdate>40) )"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_lastNeedUpdate = time;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "time_sync">*/
|
||||
@@ -100,164 +90,10 @@ class FSM
|
||||
priority = 1.000000;
|
||||
to="sync_the_time";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((time - _lastUpdate) > 300)"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _lastUpdate) > 300)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_lastUpdate = time;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "need_update">*/
|
||||
class need_update
|
||||
{
|
||||
priority = 1.000000;
|
||||
to="update_objects";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"( (count needUpdate_objects) > 0 && (time-_lastNeedUpdate>20) )"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_lastNeedUpdate = time;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="general_cleanup";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "too_many_objects">*/
|
||||
class too_many_objects
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="cleanup_objects";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((time - _timeNem) > 60)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_timeNem = time;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "cleanup_dead">*/
|
||||
class cleanup_dead
|
||||
{
|
||||
name = "cleanup_dead";
|
||||
init = /*%FSM<STATEINIT""">*/"diag_log (""CLEANUP: TOO MANY DEAD BODIES"");" \n
|
||||
"" \n
|
||||
"diag_log (""CLEANUP: PERFORMING BODY CLEANUP ON "" + str(_numDead) + "" BODIES"");" \n
|
||||
"" \n
|
||||
"_delQtyZ = 0;" \n
|
||||
"_numZombie = {_x isKindOf ""zZombie_Base""} count allDead;" \n
|
||||
"{" \n
|
||||
" if (local _x) then {" \n
|
||||
" if (_x isKindOf ""zZombie_Base"") then {" \n
|
||||
" deleteVehicle _x;" \n
|
||||
" _delQtyZ = _delQtyZ + 1;" \n
|
||||
" } else {" \n
|
||||
" _exists = _x in _deadBodies;" \n
|
||||
" if(!_exists) then {" \n
|
||||
" _deadBodies set [count _deadBodies,_x];" \n
|
||||
" };" \n
|
||||
" };" \n
|
||||
" };" \n
|
||||
"} forEach allDead;" \n
|
||||
"" \n
|
||||
"//Cleanup players" \n
|
||||
"_body = objNull;" \n
|
||||
"_delQtyP = 0;" \n
|
||||
"_delDo = _numDead - _numZombie;" \n
|
||||
"_delDo = ((_delDo min (count _deadBodies)) -1);" \n
|
||||
"if (_delDo<1) then {_delDo=1};" \n
|
||||
"for ""_i"" from 0 to _delDo do {" \n
|
||||
" _body = _deadBodies select _i;" \n
|
||||
" if(!isNil ""_body"") then {" \n
|
||||
" _pos = getPosATL _body;" \n
|
||||
" _sfx = nearestObject [_pos,""Sound_Flies""];" \n
|
||||
" if (!(isNull _sfx)) then {" \n
|
||||
" deleteVehicle _sfx;" \n
|
||||
" };" \n
|
||||
" deleteVehicle _body;" \n
|
||||
" _delQtyP = _delQtyP + 1;" \n
|
||||
" };" \n
|
||||
" _deadBodies set [_i,""DEL""];" \n
|
||||
"" \n
|
||||
"//Let's move this into the body removal sequence so uncontrolled flies are removed only if corpses are cleaned" \n
|
||||
"//Check Flies" \n
|
||||
"_isOK=-1;" \n
|
||||
"_dwUSOFC=0;" \n
|
||||
"{" \n
|
||||
" //_isOk = {!alive _x} count (nearestObjects [_x, [""CAManBase""], 2]);" \n
|
||||
" _isOk = {!alive _x} count (_x nearEntities [[""CAManBase""], 2]);" \n
|
||||
" if (_isOk>-1) then {" \n
|
||||
" diag_log (""DW_DEBUG _isOK: "" + str(_isOK) );" \n
|
||||
" };" \n
|
||||
" if ((_isOk>-1) AND (_isOK<1)) then {" \n
|
||||
" //diag_log (""CLEANUP: DELETING A SOUND OF FLIES"");" \n
|
||||
"_dwUSOFC=_dwUSOFC+1;" \n
|
||||
" deleteVehicle _x;" \n
|
||||
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED SOUND OF FLIES:"" + str(_dwUSOFC) );" \n
|
||||
" };" \n
|
||||
"} forEach allMissionObjects ""Sound_Flies"";" \n
|
||||
"" \n
|
||||
"" \n
|
||||
"//Let's move this into the body removal sequence so uncontrolled fireplaces are removed only if corpses are cleaned" \n
|
||||
"//clean fireplaces" \n
|
||||
"_dwUFPC=0;" \n
|
||||
"{" \n
|
||||
" if (local _x) then {" \n
|
||||
" //diag_log (""CLEANUP: DELETING A UNCONTROLLED FIREPLACE"");" \n
|
||||
" deleteVehicle _x;" \n
|
||||
"_dwUFPC=_dwUFPC+1;" \n
|
||||
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED FIREPLACE:"" + str(_dwUFPC) );" \n
|
||||
" };" \n
|
||||
"} forEach allMissionObjects ""Land_Fire_DZ"";" \n
|
||||
"" \n
|
||||
"};" \n
|
||||
"_deadBodies = _deadBodies - [""DEL""];" \n
|
||||
"" \n
|
||||
"diag_log (""CLEANUP: DELETED "" + str(_delQtyP) + "" PLAYER BODIES AND "" + str(_delQtyZ) + "" BODIES"");" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="general_cleanup";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "cleanup_objects">*/
|
||||
class cleanup_objects
|
||||
{
|
||||
name = "cleanup_objects";
|
||||
init = /*%FSM<STATEINIT""">*/"_missionObjs = allMissionObjects ""WeaponHolder"";" \n
|
||||
"_qty = count _missionObjs;" \n
|
||||
"" \n
|
||||
"//diag_log (""CLEANUP: PERFORMING ITEM CLEANUP: TOTAL "" + str(_qty) + "" LOOT BAGS"");" \n
|
||||
"_delQty = 0;" \n
|
||||
"{" \n
|
||||
" if (local _x) then {" \n
|
||||
" _keep = _x getVariable [""permaLoot"",false];" \n
|
||||
" _nearby = {isPlayer _x} count (_x nearEntities [[""CAManBase""], 100]);" \n
|
||||
" if ( (!_keep) && (_nearby==0) ) then {" \n
|
||||
" deleteVehicle _x;" \n
|
||||
" _delQty = _delQty + 1;" \n
|
||||
" };" \n
|
||||
" };" \n
|
||||
"} forEach _missionObjs;" \n
|
||||
"if (_delQty > 0) then {" \n
|
||||
" diag_log (""CLEANUP: DELETED "" + str(_delQty) + "" LOOT BAGS"");" \n
|
||||
"};" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "true">*/
|
||||
class true
|
||||
{
|
||||
@@ -281,14 +117,23 @@ class FSM
|
||||
"_outcome = _result select 0;" \n
|
||||
"if(_outcome == ""PASS"") then {" \n
|
||||
" _date = _result select 1; " \n
|
||||
" _dateNum = dateToNumber(_date); " \n
|
||||
" _diff = ( _dateNum - dateToNumber (date) )*365*24*60;" \n
|
||||
" if ( abs(_diff)>5 ) then {" \n
|
||||
" " \n
|
||||
" if(dayz_fullMoonNights) then {" \n
|
||||
" //date setup" \n
|
||||
" _year = _date select 0;" \n
|
||||
" _month = _date select 1;" \n
|
||||
" _day = _date select 2;" \n
|
||||
" _hour = _date select 3;" \n
|
||||
" _minute = _date select 4;" \n
|
||||
" " \n
|
||||
" //Force full moon nights" \n
|
||||
" _date = [2012,6,6,_hour,_minute];" \n
|
||||
" };" \n
|
||||
"" \n
|
||||
" setDate _date;" \n
|
||||
" dayzSetDate = _date;" \n
|
||||
" publicVariable ""dayzSetDate"";" \n
|
||||
" diag_log (""TIME SYNC: Local Time set to "" + str(_date));" \n
|
||||
" };" \n
|
||||
" diag_log (""TIME SYNC: Local Time set to "" + str(_date)); " \n
|
||||
"};" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
@@ -320,45 +165,15 @@ class FSM
|
||||
" };" \n
|
||||
"} forEach allGroups;" \n
|
||||
"" \n
|
||||
"/*" \n
|
||||
"//Check for Ammobox" \n
|
||||
" {" \n
|
||||
" if(!(_x isKindOf ""WeaponHolder"")) then {" \n
|
||||
" diag_log (""CLEANUP: DELETING AN AMMOBOX "" + (typeOf _x));" \n
|
||||
" deleteVehicle _x;" \n
|
||||
" };" \n
|
||||
" } forEach allMissionObjects ""ReammoBox"";" \n
|
||||
"*/" \n
|
||||
"" \n
|
||||
"//Check for hackers" \n
|
||||
" {" \n
|
||||
" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
|
||||
" if(vehicle _x != _x && !(vehicle _x in _safety) && (isPlayer _x) && (typeOf vehicle _x) != ""ParachuteWest"") then {" \n
|
||||
" diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
|
||||
" (vehicle _x) setDamage 1;" \n
|
||||
" _x setDamage 1;" \n
|
||||
" };" \n
|
||||
" } forEach allUnits;" \n
|
||||
"" \n
|
||||
"/*" \n
|
||||
"//Let's move this into the body removal sequence so uncontrolled flies are removed only if corpses are cleaned" \n
|
||||
"//Check Flies" \n
|
||||
"_isOK=-1;" \n
|
||||
"_dwUSOFC=0;" \n
|
||||
"{" \n
|
||||
" //_isOk = {!alive _x} count (nearestObjects [_x, [""CAManBase""], 2]);" \n
|
||||
" _isOk = {!alive _x} count (_x nearEntities [[""CAManBase""], 2]);" \n
|
||||
" if (_isOk>-1) then {" \n
|
||||
" diag_log (""DW_DEBUG _isOK: "" + str(_isOK) );" \n
|
||||
" };" \n
|
||||
" if ((_isOk>-1) AND (isOK<1)) then {" \n
|
||||
" //diag_log (""CLEANUP: DELETING A SOUND OF FLIES"");" \n
|
||||
"_dwUSOFC=_dwUSOFC+1;" \n
|
||||
" deleteVehicle _x;" \n
|
||||
" diag_log (""CLEANUP: DELETED AN UNCONTROLLED SOUND OF FLIES:"" + str(_dwUSOFC) );" \n
|
||||
" };" \n
|
||||
"} forEach allMissionObjects ""Sound_Flies"";" \n
|
||||
"*/" \n
|
||||
"" \n
|
||||
"dayz_serverObjectMonitor = _safety;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
@@ -383,11 +198,12 @@ class FSM
|
||||
init = /*%FSM<STATEINIT""">*/"diag_log (""CLEANUP: INITIALIZING CLEANUP SCRIPT"");" \n
|
||||
"" \n
|
||||
"_safety = dayz_serverObjectMonitor;" \n
|
||||
"_dateNow = (DateToNumber date);" \n
|
||||
"" \n
|
||||
"_lastUpdate = time;" \n
|
||||
"_timeNem = time;" \n
|
||||
"_deadBodies = [];" \n
|
||||
"_lastNeedUpdate = time;" \n
|
||||
"_lastUpdate = diag_tickTime;" \n
|
||||
"_timeNem =diag_tickTime;" \n
|
||||
"" \n
|
||||
"_lastNeedUpdate = diag_tickTime;" \n
|
||||
"_maxBodies = 15;" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
|
||||
@@ -36,7 +36,6 @@ if(_outcome == "PASS") then {
|
||||
};
|
||||
|
||||
if(isDedicated) then {
|
||||
//["dayzSetDate",_date] call broadcastRpcCallAll;
|
||||
setDate _date;
|
||||
dayzSetDate = _date;
|
||||
publicVariable "dayzSetDate";
|
||||
@@ -280,8 +279,12 @@ if (isServer and isNil "sm_done") then {
|
||||
nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', HeliCrashArea, true, false] spawn server_spawnCrashSite;
|
||||
};
|
||||
|
||||
if (isDedicated) then {
|
||||
// Epoch Events
|
||||
nul = [] spawn server_spawnEvents;
|
||||
_id = [] spawn server_spawnEvents;
|
||||
// server cleanup
|
||||
_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
|
||||
};
|
||||
|
||||
allowConnection = true;
|
||||
sm_done = true;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
DayZ Epoch 1.0.1.6
|
||||
DayZ Epoch 1.0.1.7
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
Reference in New Issue
Block a user