Merge branch 'EpochModTeam:master' into master

This commit is contained in:
W0LF
2022-04-03 10:53:14 +03:00
committed by GitHub
83 changed files with 13431 additions and 1157 deletions

View File

@@ -1,77 +1,175 @@
/*
Created exclusively for ArmA2:OA - DayZMod.
Please request permission to use/alter/distribute from project leader (R4Z0R49) AND the author (facoptere@gmail.com)
*/
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// fn_isInsideBuilding.sqf
//
// Author: Victor the Cleaner
// Date: April 2022
//
// [_unit] call fnc_isInsideBuilding;
//
// Called continuously from player_checkStealth.
// Used for temperature, stealth vs zombies, and blizzard effects.
//
///////////////////////////////////////////////////////////////////////////////////////////////////
local _unit = _this select 0; // player
local _inside = false;
local _scan = 3; // horizontal radius around player (in meters)
local _zenith = 50; // scan height above and below player
local _posASL = aimPos _unit; // center of mass (ASL)
local _posLowASL = getPosASL _unit; // foot of player (ASL)
_posLowASL set [2, (_posLowASL select 2) + 0.3]; // shin level, below most windows
// check if arg#0 is inside or on the roof of a building
// second argument is optional:
// - arg#1 is an object: check whether arg#0 is inside (bounding box of) arg#1
// - missing arg#1: check whether arg#0 is inside (bounding box of) the nearest enterable building
// - arg#1 is a boolean: check also whether arg#0 is inside (bounding box of) some non-enterable buildings around. Can be used to check if a player or an installed item is on a building roof.
// - arg#0 is posATL, arg#1 should be a building
local _posX = _posASL select 0;
local _posY = _posASL select 1;
local _posZ = _posASL select 2;
local _posLowZ = _posLowASL select 2;
private ["_check","_unit","_inside","_building","_type","_option"];
local _insideBox = objNull; // object the player is inside of
local _type = ""; // class name
local _roofAbove = false; // is there geometry above
local _intersect = false; // for raycast
local _hit = []; // array to record hits and misses
local _idx = 0; // initialize
local _truth = []; // used with the _hit array
_check = {
private ["_building", "_pos", "_inside", "_offset", "_relPos", "_boundingBox", "_min", "_max", "_myX", "_myY", "_myZ"];
local _cowsheds = ["Land_Farm_Cowshed_a","Land_Farm_Cowshed_b","Land_Farm_Cowshed_c"];
local _isCowshed = false; // special case objects
_building = _this select 0;
_inside = false;
if (isNull _building) exitWith {_inside};
_pos = _this select 1;
_offset = 1; // shrink building boundingbox by this length.
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Functions
//
///////////////////////////////////////////////////////////////////////////////////////////////////
local _checkBox = {
local _object = _this select 0; // object
_type = typeOf _object; // class name
_relPos = _building worldToModel _pos;
_boundingBox = boundingBox _building;
if (_type isKindOf "House" || {_type isKindOf "Church" || {_type in DZE_insideExceptions}}) then {
_min = _boundingBox select 0;
_max = _boundingBox select 1;
_myX = _relPos select 0;
_myY = _relPos select 1;
_myZ = _relPos select 2;
local _pos = _object worldToModel (ASLToATL _posASL);
local _max = (boundingBox _object) select 1;
_insideBox = _object;
if ((_myX > (_min select 0)+_offset) and {(_myX < (_max select 0)-_offset)}) then {
if ((_myY > (_min select 1)+_offset) and {(_myY < (_max select 1)-_offset)}) then {
if ((_myZ > (_min select 2)) and {(_myZ < (_max select 2))}) then {
_inside = true;
};
for "_i" from 0 to 2 do {
if (abs (_pos select _i) > (_max select _i)) exitWith {_insideBox = objNull;};
};
};
//diag_log(format["fnc_isInsideBuilding: building:%1 typeOf:%2 bbox:%3 relpos:%4 result:%5", _building, typeOf(_building), _boundingBox, _relPos, _inside ]);
};
local _scanUp = {
local _pos = [_posX, _posY, _posZ + _zenith];
local _arr = lineIntersectsWith [_posASL, _pos, _unit, objNull, true]; // sorted (nearest last)
_inside
for "_i" from (count _arr - 1) to 0 step -1 do { // count backwards
[_arr select _i] call _checkBox; // validate object
if (!isNull _insideBox) exitWith {_roofAbove = true;}; // player is within bounds of a candidate object
};
};
local _scanDown = {
local _pos = [_posX, _posY, _posZ - _zenith];
local _arr = lineIntersectsWith [_posASL, _pos, _unit, objNull, true]; // sorted (nearest last)
for "_i" from (count _arr - 1) to 0 step -1 do { // count backwards
[_arr select _i] call _checkBox; // validate object
if (!isNull _insideBox) exitWith {}; // player is within bounds of a candidate object
};
};
local _scanNear = {
local _north = [_posX, _posY + _scan, _posZ];
local _east = [_posX + _scan, _posY, _posZ];
local _south = [_posX, _posY - _scan, _posZ];
local _west = [_posX - _scan, _posY, _posZ];
local _cp = [_north, _east, _south, _west, _north]; // compass points
scopeName "near";
for "_i" from 0 to 3 do {
local _arr = lineIntersectsWith [_cp select _i, _cp select (_i + 1)]; // unsorted
{
[_x] call _checkBox; // validate object
if (!isNull _insideBox) then {breakTo "near";}; // player is within bounds of a candidate object
} count _arr;
};
};
_unit = _this select 0;
_inside = false;
// [object] call fnc_isInsideBuilding;
// This option is called continuously from player_checkStealth.
if (count _this == 1) exitWith {
//_building = nearestObject [_unit, "Building"];
_building = nearestBuilding _unit; // Not sure if this command is faster.
_inside = [_building,(getPosATL _unit)] call _check;
_inside
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Cowsheds are arranged from 3 separate classes. Therefore, we need to allow adjacent
// cowshed class names as substitutes for the object we're scanning.
//
///////////////////////////////////////////////////////////////////////////////////////////////////
local _cowshedCheck = {
local _array = _this select 0;
if (_isCowshed) then {
{
if (typeOf _x in _cowsheds) exitWith { // is object of similar type?
_intersect = true; // override radial scan
_truth set [0,49]; // force hit detection
};
} forEach _array;
};
};
local _checkWalls = {
// known problem buildings
if (_type == (_cowsheds select 2) && _idx in [3]) exitWith {_hit set [_idx, 49];}; // simulate wall at East sector
if (_type == (_cowsheds select 1) && _idx in [3,11]) exitWith {_hit set [_idx, 49];}; // simulate walls at East and West sectors
if (_type == (_cowsheds select 0) && _idx in [11]) exitWith {_hit set [_idx, 49];}; // simulate wall at West sector
};
_option = _this select 1;
// [object,building] call fnc_isInsideBuilding;
if (typeName _option == "OBJECT") then {
// optional argument is a specific building
_inside = [_option,(getPosATL _unit)] call _check;
} else {
// [object,boolean] call fnc_isInsideBuilding; This is used in fn_niceSpot.
{
_building = _x;
_type = typeOf _building;
if (!(_type in DayZ_SafeObjects) // not installable objects
&& {!(_type isKindOf "ReammoBox")} // not lootpiles (weaponholders and ammoboxes)
&& {((sizeOf typeOf _unit) + (sizeOf _type)) > (_unit distance _building)} // objects might colliding
&& {[_building, _unit] call _check}) exitWith { // perform the check. exitWith works only in non-nested "if"
_inside = true;
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// Initial scan to determine if player is above, below, or near a building
//
///////////////////////////////////////////////////////////////////////////////////////////////////
call _scanUp;
if (isNull _insideBox) then { // no detectable roof
call _scanDown;
if (isNull _insideBox) then { // no detectable floor
call _scanNear;
};
};
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// If player is inside a bounding box, perform radial scan and determine the outcome
//
///////////////////////////////////////////////////////////////////////////////////////////////////
if (!isNull _insideBox) then { // bounding box detected
local _dir = getDir _insideBox; // direction of object on map
local _rad = sizeOf (typeOf _insideBox); // scan radius
local _seg = 16; // radial scan density (must be evenly divisible by 4)
local _arc = 360 / _seg; // radial scan delta
local _miss = "00000"; // must be (_seg / 4 + 1) characters in length -- the number of consecutive misses before player is determined to be outside
_isCowshed = _type in _cowsheds; // special case for known problem buildings
for "_n" from _arc to 360 step _arc do { // perform radial scan
local _angle = (_dir + _n) % 360; // normalize from 0 to 360
local _a = (sin _angle) * _rad; // X offset
local _b = (cos _angle) * _rad; // Y offset
local _v = [_posX + _a, _posY + _b, _posZ]; // radial vector
_truth = [48,49]; // [miss,hit]
local _arr = lineIntersectsWith [_posASL, _v, _unit]; // raycast
_intersect = (_insideBox in _arr); // did an intersect occur?
[_arr] call _cowshedCheck; // check known problem buildings
if (!_intersect && _roofAbove) then { // if no hit at chest level, check lower. This eliminates most normal windows.
_v = [_posX + _a, _posY + _b, _posLowZ]; // radial vector Low
_arr = lineIntersectsWith [_posLowASL, _v, _unit]; // raycast
[_arr] call _cowshedCheck; // re-check known problem buildings
};
} forEach (nearestObjects [_unit, ["Building"], 50]);
};
//diag_log ("fnc_isInsideBuilding Check: " + str(_inside)+ " last building:"+str(_building));
_hit set [_idx, _truth select (_insideBox in _arr)]; // record hit or miss
call _checkWalls; // simulate walls for known problem buildings, and override scan
_idx = _idx + 1;
};
for "_i" from 0 to 3 do {
_hit set [_seg + _i, _hit select _i]; // loop (_seg / 4) times to allow wrap-around search
};
if (!_roofAbove) then {_miss = "0000";}; // if player is on a roof or in an open area, reduce the consecutive miss criteria by one arc
if !([_miss, toString _hit] call fnc_inString) then { // if there are no sufficient consecutive misses, then player is deemed to be inside
_inside = true;
};
};
dayz_insideBuilding = [objNull, _insideBox] select _inside;
_inside

View File

@@ -60,31 +60,30 @@ if ((round(random _chance) == _chance) or (_chance == 0)) then {
///////////////////////////////////////////////////////////////////////////////////////////
//
// Attach sound source to dummy object so that long duration sfx can be muted if
// Attach sound source to helper object so that long duration sfx can be muted if
// action is cancelled.
//
///////////////////////////////////////////////////////////////////////////////////////////
local _killSound = (dayz_actionInProgress && (_type in ["bandage","chopwood","cook","gut","minestone","refuel","repair","tentpack"]));
if (_killSound) then {
local _dummy = "Sign_sphere10cm_EP1" createVehicleLocal [0,0,0];
_dummy hideObject true;
_dummy setPosATL (getPosATL _unit);
local _helper = "Helper_1_DZE" createVehicle [0,0,0]; // invisible helper
_helper setPosATL (getPosATL _unit); // move to player
if (_type == "bandage") then {_dummy attachTo [_unit, [0,0,0]];};
if (_type == "bandage") then {
_helper attachTo [_unit, [0,0,0]]; // medical actions will be heard as player moves
};
_unit = _helper; // sound source is now the helper object
_unit = _dummy;
_dummy spawn {
_helper spawn {
r_interrupt = false;
while {dayz_actionInProgress && !r_interrupt} do {
sleep 0.1;
uisleep 0.1;
};
if (r_interrupt) then {
if (r_interrupt) then { // if player cancels the action
1.5 fadeSpeech 0; // fade out
sleep 1.5; // wait
uisleep 1.5; // wait
};
deleteVehicle _this; // kill sound
0 fadeSpeech 1; // restore sound

View File

@@ -1,10 +1,13 @@
// EPOCH CONFIG VARIABLES //
// To change a variable copy paste it in the mission init.sqf below the #include line.
// Standard DayZ variables are found in dayz_code\init\variables.sqf.
// Do not move the variables from here to the init.sqf. This file was made to have all variables in one place.
// Both
dayz_infectiouswaterholes = true; //Enable infected waterholes
dayz_REsec = 1; // DayZ RE Security / 1 = enabled // 0 = disabled
DZE_PlayerZed = false; // Enable spawning as a player zombie when players die with infected status
DZE_SafeZonePosArray = []; //Fail-Safe, actual safezones are defined in the map specific init's
dayz_infectiouswaterholes = true; //Enable infected waterholes, randomly adds some bodies, graves and wrecks by ponds (negatively impacts FPS), not supported by all maps
dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus. Also enables comfrey plant spawner which negatively impacts performance.
dayz_townGeneratorBlackList = []; // If townGenerator is enabled it will not spawn junk within 150m of these positions. Example for Chernarus traders: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]
DZE_HeliLift = true; // Enable Epoch heli lift system
@@ -13,9 +16,9 @@ DZE_NoVehicleExplosions = false; //Disable vehicle explosions to prevent damage
DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray?
dayz_ForcefullmoonNights = false; // Forces night time to be full moon.
infectedWaterHoles = []; //Needed for non-cherno maps.
DZE_GodModeBase = false; // Disables damage handler from base objects so they can't be destroyed.
DZE_GodModeBase = false; // Disables damage handler from base objects so they can't be destroyed. Make player built base objects indestructible.
dayz_spawnselection = 0; //(Chernarus only) Turn on spawn selection 0 = random only spawns, 1 = spawn choice based on limits
dayz_classicBloodBagSystem = false; // disable blood types system and use the single classic ItemBloodbag
dayz_classicBloodBagSystem = true; // disable blood types system and use the single classic ItemBloodbag
dayz_enableFlies = true; // Enable flies on dead bodies (negatively impacts FPS).
// Death Messages
@@ -85,8 +88,24 @@ DZE_WeatherVariables = [
2 // Winter Breath Fog Effects. Options: 0 - no breath fog, 1 - anytime, 2 - only when snowing or blizzard. Note: breath fog is only available with winter weather enabled.
];
DZE_PlotManagementAdmins = []; //Array of admin PlayerUIDs. UIDs in this list are able to access every pole's management menu and delete or build any buildable with a pole nearby.
DZE_doorManagementAdmins = []; //Array of admin PlayerUIDs. UIDs in this list are able to access every door's management menu and open it.
// Uncomment the lines below to change the default loadout
//DefaultMagazines = ["HandRoadFlare","ItemBandage","ItemPainkiller","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"];
//DefaultWeapons = ["Makarov_DZ","ItemFlashlight"];
//DefaultBackpack = "GymBag_Camo_DZE1";
//DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"];
//Server
if (isServer) then {
EpochEvents = [ //[year,month,day of month, minutes,name of file - .sqf] If minutes is set to -1, the event will run once immediately after server start.
//["any","any","any","any",-1,"Infected_Camps"], // (negatively impacts FPS)
["any","any","any","any",-1,"Care_Packages"],
["any","any","any","any",-1,"CrashSites"]
];
dayz_POIs = false; //Adds Point of Interest map additions (negatively impacts FPS)
DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with
DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with
DynamicVehicleFuelLow = 0; // Min fuel random vehicles can spawn with
@@ -94,12 +113,8 @@ if (isServer) then {
MaxAmmoBoxes = 3; // Max number of random Supply_Crate_DZE filled with vehicle ammo to spawn around the map
MaxMineVeins = 50; // Max number of random mine veins to spawn around the map
DZE_TRADER_SPAWNMODE = false; // Vehicles purchased at traders will be parachuted in
EpochEvents = []; // [year,month,day of month, minutes,name of file - .sqf] If minutes is set to -1, the event will run once immediately after server start.
MaxDynamicDebris = 100; // Max number of random road blocks to spawn around the map
MaxVehicleLimit = 50; // Max number of random vehicles to spawn around the map
spawnArea = 1400; // Distance around markers to find a safe spawn position
spawnShoremode = 1; // Random spawn locations 1 = on shores, 0 = inland
dayz_POIs = false; //Enable POI's
dayz_enableGhosting = false;
dayz_ghostTimer = 120;
DZE_disableThermal = []; // Array of vehicle classnames to disable thermal on when being spawned. i.e: ["AH1Z","MTVR"];
@@ -121,11 +136,19 @@ if (isServer) then {
// Client
if (!isDedicated) then {
dayz_antihack = 1; // DayZ Antihack / 1 = enabled // 0 = disabled
dayZ_serverName = ""; //Shown to all players in the bottom left of the screen (country code + server number)
dayz_enableRules = true; //Enables a nice little news/rules feed on player login (make sure to keep the lists quick).
dayz_randomMaxFuelAmount = 500; //Puts a random amount of fuel in all fuel stations.
dayz_bleedingeffect = 2; //1 = blood on the ground (negatively impacts FPS), 2 = partical effect, 3 = both
DZE_R3F_WEIGHT = true; // Enable R3F weight. Players carrying too much will be overburdened and forced to move slowly.
DZE_defaultSkin = [["Survivor2_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","Doctor_DZ","Assistant_DZ","Worker1_DZ","Worker3_DZ","Worker4_DZ","TK_CIV_Takistani01_EP1_DZ","TK_CIV_Takistani03_EP1_DZ","TK_CIV_Takistani04_EP1_DZ","TK_CIV_Takistani06_EP1_DZ","Firefighter1_DZ","Firefighter2_DZ","Firefighter3_DZ","Firefighter4_DZ","Firefighter5_DZ","Firefighter_Officer1_DZ","Firefighter_Officer2_DZ","Postman1_DZ","Postman2_DZ","Postman3_DZ","Postman4_DZ","SchoolTeacher_DZ","Gardener_DZ","RU_Policeman2_DZ","Hunter_DZ","Civilian1_DZ","Civilian3_DZ","Civilian5_DZ","Civilian7_DZ","Civilian9_DZ","Civilian11_DZ","Civilian13_DZ","Prisoner1_DZ","Prisoner2_DZ","Prisoner3_DZ","Reporter_DZ","MafiaBoss_DZ","Dealer_DZ","BusinessMan_DZ"],["SurvivorW2_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWpink_DZ","SurvivorW3_DZ"]]; // Default player skin for fresh spawns, selected randomly DZE_defaultSkin = [["Male skin1","Male skin2"],["Female skin1","Female skin2"]], comment out the whole line to disable this feature.
dayz_tameDogs = false; // Allow taming dogs with raw meat. Note dog behavior is experimental and buggy.
DZE_WarmClothes = []; //Array of warm clothes, type of player model must be added: E.g. ["MVD_Soldier_DZ","GUE_Soldier_2_DZ"];
DZE_TempVars = [7, 15, 4, 4, 2, 6, 8, 3, 2, 0.25, 0.75, 0.5, 12, 33]; //[vehicle, fire, building, moving, sun, heatpack, warm clothes, water, standing, rain, wind, night, snow, shivering] water, standing, rain, wind and night factors have a negative impact on temperature. The greater they are the quicker the player gets cold. To disable shivering set it to 26.
DZE_TwoPrimaries = 2; // 0 do not allow primary weapon on back. 1 allow primary weapon on back, but not when holding a primary weapon in hand. 2 allow player to hold two primary weapons, one on back and one in their hands.
dayz_quickSwitch = false; //Turns on forced animation for weapon switch. (hotkeys 1,2,3) False = enable animations, True = disable animations
DZE_AntiWallLimit = 3; // Number of activations before player_antiWall kills player for glitching attempt. Lower is stricter, but may result in false positives.
DZE_DamageBeforeMaint = 0.09; // Min damage built items must have before they can be maintained
DZE_NameTags = 0; // Name displays when looking at player up close 0 = Off, 1= On, 2 = Player choice
@@ -135,19 +158,16 @@ if (!isDedicated) then {
DZE_RestrictSkins = []; // Clothes that players are not allowed to wear. i.e. ["Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ"] etc.
DZE_VanillaUICombatIcon = true; //Display or hide combat UI icon if using DZE_UI = "vanilla"; otherwise it has no affect.
timezoneswitch = 0; // Changes murderMenu times with this offset in hours.
dayz_maxGlobalZeds = 1000; // Maximum allowed zeds on the map
dayz_quickSwitch = false; //Enable quick weapon switch,
dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map
dayz_paraSpawn = false; // Helo jump spawn
DZE_SelfTransfuse = false; // Allow players to give themselves blood transfusions
DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions
DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)]
dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks
dayz_randomMaxFuelAmount = 500; //Puts a random amount of fuel in all fuel stations.
DZE_BackpackAntiTheft = false; // Prevents accessing backpack gear of non-friendly players in trader cities
DZE_BackpackAntiTheft = true; // Prevents accessing backpack gear of non-friendly players in trader cities
DZE_StaticConstructionCount = 0; // Number of animations required for building an object. Leaving set at zero will default to the construction count in the configs for each object.
dayz_maxMaxWeaponHolders = 120; // Maximum number of loot piles that can spawn within 200 meters of a player.
dayz_bleedingeffect = 2; //1 = blood on the ground (negatively impacts FPS), 2 = partical effect, 3 = both
dayz_temperature_override = true; // Set to true to disable all temperature changes.
dayz_nutritionValuesSystem = false; //true, Enables nutrition system, false, disables nutrition system.
dayz_temperature_override = false; // Set to true to disable all temperature changes.
dayz_nutritionValuesSystem = true; //true, Enables nutrition system, false, disables nutrition system.
DZE_DisableVehicleUpgrade = []; // List of vehicles that cannot be upgraded with manuals E.g.: ["ArmoredSUV_PMC_DZE","LandRover_CZ_EP1_DZE"]
DZE_debrisRefundParts = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"]; // Dynamic debris wrecks refund
@@ -197,7 +217,6 @@ if (!isDedicated) then {
// Plot Management and Plot for Life
DZE_plotManagementMustBeClose = false; //Players must be within 10m of pole to be added as a plot friend.
DZE_PlotManagementAdmins = []; //Array of admin PlayerUIDs. UIDs in this list are able to access every pole's management menu and delete or build any buildable with a pole nearby.
DZE_MaxPlotFriends = 10; //Max friends allowed on a plot. There is no character limit in the inventory field of the database, but lower values limit the max global setVariable size to improve performance.
DZE_maintainCurrencyRate = 100; //The currency rate of what maintaining an item will be, for instance: at 100, 10 items will have a worth of 1000 (1 10oz gold or 1k coins) see actions/maintain_area.sqf for more examples.
DZE_limitPlots = 0; // Limit the amount of plot poles per person, Use 0 to disable. UIDS in the DZE_PlotManagementAdmins array are exempt.
@@ -222,12 +241,6 @@ if (!isDedicated) then {
DZE_displayHelpers = true; // enable/disable display of modular object helpers
DZE_displayOnlyIfNearby = false; // if identical object types are nearby, display green helpers. If no identical types are nearby, then do not display. false = always display green helpers. (This setting does not apply to Red and Blue helpers). If DZE_displayHelpers is disabled, then this setting will be ignored.
DZE_RefundDamageLimit = 0.25; // amount of damage an object can withstand before no refunded parts will be given. 0 = disable (will always refund)
DZE_helperSize = [[3,"Sign_sphere100cm_EP1"],[2,"Sign_sphere25cm_EP1"],[1,"Sign_sphere10cm_EP1"]]; // array of helper sizes and corresponding class. Keep in reverse order for optimized lookup
DZE_helperSizeDefault = 3; // default to large sphere
DZE_NoRefundTransparency = 0.5; // Red Basebuilding Helper Transparency. min = 0.1, max = 1
DZE_removeTransparency = 0.5; // Green Basebuilding Helper Transparency. min = 0.1, max = 1
DZE_deconstructTransparency = 0.5; // Blue Basebuilding Helper Transparency. min = 0.1, max = 1
DZE_largeObjects = ["MetalContainer2D_DZ","MetalContainer1G_DZ","MetalContainer1B_DZ","MetalContainer1A_DZ","DragonTeeth_DZ","DragonTeethBig_DZ","MetalFloor4x_DZ","Land_metal_floor_2x2_wreck","WoodFloor4x_DZ","Land_wood_floor_2x2_wreck","Scaffolding_DZ","CinderGateFrame_DZ","CinderGate_DZ","CinderGateLocked_DZ","WoodGateFrame_DZ","Land_DZE_WoodGate","Land_DZE_WoodGateLocked","WoodRamp_DZ","Metal_Drawbridge_DZ","Metal_DrawbridgeLocked_DZ","Land_WarfareBarrier10x_DZ","Land_WarfareBarrier10xTall_DZ","SandNestLarge_DZ"]; // adjust _allowedDistance in fn_selfActions.sqf for large modular/crafted objects
// Refund single kits, or modular object recipes as per the build configs
// [[Enable, Modular Object, Refund Kit, [[Refund Class 1, Qty], [Refund Class 2, Qty], [Refund Class 3, Qty], [Refund Class 4, Qty]]]]
@@ -370,7 +383,6 @@ if (!isDedicated) then {
// Door Management
DZE_doorManagementMustBeClose = false; //Players must be within 10m of door to be added as a door friend.
DZE_doorManagementAdmins = []; //Array of admin PlayerUIDs. UIDs in this list are able to access every door's management menu and open it.
DZE_doorManagementAllowManualCode = true; //Allow unlocking doors by manually entering the combination. Setting false requires the use of eye scan for all doors.
DZE_doorManagementMaxFriends = 10; //Max friends allowed on a door. There is no character limit in the inventory field of the database, but lower values limit the max global setVariable size to improve performance.
DZE_doorManagementHarderPenalty = true; //Enforce an exponential wait on attempts between unlocking a door from a failed code.

View File

@@ -767,6 +767,7 @@ if (!isDedicated) then {
DZ_KeyDown_EH = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\keyboard.sqf";
dayz_EjectPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dze_ejectPlayer.sqf";
fnc_isInsideBuilding = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf"; //_isInside = [_unit,_building] call fnc_isInsideBuilding;
};
//Both
@@ -789,7 +790,6 @@ fnc_veh_handleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\co
fnc_veh_handleRepair = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_handleRepair.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
fnc_veh_ResetEH = compile preprocessFileLineNumbers "\z\addons\dayz_code\init\veh_ResetEH.sqf"; //Initialize vehicle
fnc_inString = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_inString.sqf";
fnc_isInsideBuilding = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf"; //_isInside = [_unit,_building] call fnc_isInsideBuilding;
dayz_zombieSpeak = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf"; //Used to generate random speech for a unit
vehicle_getHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf";
local_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObject.sqf"; //Generated on the server (or local to unit) when gutting an object

View File

@@ -72,6 +72,8 @@ if (isServer) then {
/**************Variables Compiled on Clients Only**************/
if (!isDedicated) then {
DZE_schedDebug = 0; // Debug some scheduler lines
DZE_playerFSMDebug = 0; // Debug whole player.fsm
// Rolling Msg system
Message_1 = "";
@@ -316,6 +318,13 @@ if (!isDedicated) then {
DZE_WaterSources = ["Land_pumpa","Land_Barrel_water","Land_Misc_Well_C_EP1","Land_Misc_Well_L_EP1","land_smd_water_pump","Watertank_DZE","Watertower_DZE","Land_water_tank","MAP_water_tank"];
// Helper Colors Require Reformatting
DZE_helperSize = [[3,"Sign_sphere100cm_EP1"],[2,"Sign_sphere25cm_EP1"],[1,"Sign_sphere10cm_EP1"]]; // array of helper sizes and corresponding class. Keep in reverse order for optimized lookup
DZE_helperSizeDefault = 3; // default to large sphere
DZE_NoRefundTransparency = 0.5; // Red Basebuilding Helper Transparency. min = 0.1, max = 1
DZE_removeTransparency = 0.5; // Green Basebuilding Helper Transparency. min = 0.1, max = 1
DZE_deconstructTransparency = 0.5; // Blue Basebuilding Helper Transparency. min = 0.1, max = 1
DZE_largeObjects = ["MetalContainer2D_DZ","MetalContainer1G_DZ","MetalContainer1B_DZ","MetalContainer1A_DZ","DragonTeeth_DZ","DragonTeethBig_DZ","MetalFloor4x_DZ","Land_metal_floor_2x2_wreck","WoodFloor4x_DZ","Land_wood_floor_2x2_wreck","Scaffolding_DZ","CinderGateFrame_DZ","CinderGate_DZ","CinderGateLocked_DZ","WoodGateFrame_DZ","Land_DZE_WoodGate","Land_DZE_WoodGateLocked","WoodRamp_DZ","Metal_Drawbridge_DZ","Metal_DrawbridgeLocked_DZ","Land_WarfareBarrier10x_DZ","Land_WarfareBarrier10xTall_DZ","SandNestLarge_DZ"]; // adjust _allowedDistance in fn_selfActions.sqf for large modular/crafted objects
DZE_NoRefundTexture = [0, format["#(argb,8,8,3)color(1.00,0.00,0.00,%1,ca)", (DZE_NoRefundTransparency max 0.1)] ]; // red
DZE_removeTexture = [0, format["#(argb,8,8,3)color(0.15,1.00,0.40,%1,ca)", (DZE_removeTransparency max 0.1)] ]; // green
DZE_deconstructTexture = [0, format["#(argb,8,8,3)color(0.15,0.00,1.00,%1,ca)", (DZE_deconstructTransparency max 0.1)] ]; // blue
@@ -491,4 +500,6 @@ if (!isDedicated) then {
["RightFoot","LeftFoot"],
["neck","pilot"]
];
dayz_insideBuilding = objNull; // building name the player is currently inside of, or objNull if player is outside
DZE_insideExceptions = ["Garage_Green_DZ","Garage_White_DZ","Garage_Brown_DZ","Garage_Grey_DZ","Wooden_shed_DZ","Wooden_shed2_DZ","WoodShack_DZ","WoodShack2_DZ","StorageShed_DZ","StorageShed2_DZ","Concrete_Bunker_DZ","Concrete_Bunker_Locked_DZ","SandNestLarge_DZ"]; // list of base-building objects that allow checking if player is inside (fnc_isInsideBuilding)
};

View File

@@ -2,7 +2,7 @@ BIS_Effects_Init = true;
Corepatch_Effects_Init = true;
if (isNil "BIS_Effects_Init_DZ") then {
BIS_Effects_Init_DZ = true;
diag_log "Res3tting B!S effects...";
//diag_log "Res3tting B!S effects...";
BIS_Effects_EH_Fired=compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\fired.sqf"; // Allows tanks to use smoke counter measures
BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";

View File

@@ -35,4 +35,4 @@ inGameUISetEventHandler ["Action","false"];
deleteVehicle _plant;
} count ["grass","prunus","picea","fallentree","phragmites","acer","amygdalusn","Brush","fiberplant","amygdalusc","boulder"];
diag_log format ["%1: Plants libs tests done!",__FILE__];
//diag_log format ["%1: Plants libs tests done!",__FILE__];

View File

@@ -265,7 +265,6 @@ class FSM
"_timeStart = diag_tickTime;" \n
"_readytoAuth = false;" \n
"_startCheck = 0;" \n
"_debug = 0;" \n
"_schedulerStarted=false;" \n
"_spawnSelection = 9;" \n
"" \n
@@ -273,7 +272,7 @@ class FSM
"_timeNemRegion = 0;" \n
"" \n
"" \n
"if (_debug == 1) then {" \n
"if (DZE_playerFSMDebug == 1) then {" \n
"diag_log (""DAYZ: CLIENT IS RUNNING DAYZ_CODE "" + str(dayz_versionNo));" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
@@ -335,7 +334,7 @@ class FSM
itemno = 4;
init = /*%FSM<STATEINIT""">*/"dayz_loadScreenMsg = localize 'str_player_loading'; " \n
"" \n
"if (_debug == 1) then {diag_log [diag_tickTime,'Loading'];};"/*%FSM</STATEINIT""">*/;
"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Loading'];};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -364,7 +363,7 @@ class FSM
"" \n
"_playerUID = getPlayerUID player;" \n
"dayz_progressBarValue = 0.6;" \n
"if (_debug == 1) then {diag_log [diag_tickTime,'Collect'];};"/*%FSM</STATEINIT""">*/;
"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Collect'];};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -424,7 +423,7 @@ class FSM
{
name = "Request";
itemno = 11;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Request'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Request'];};" \n
"" \n
"dayz_loadScreenMsg = localize 'str_player_request';" \n
"" \n
@@ -432,10 +431,10 @@ class FSM
"dayz_progressBarValue = 0.65;" \n
"PVDZ_plr_Login1 = [_playerUID,player];" \n
"publicVariableServer ""PVDZ_plr_Login1"";" \n
"diag_log ['Sent to server: PVDZ_plr_Login1', PVDZ_plr_Login1]; " \n
"if (DZE_playerFSMDebug == 1) then {diag_log ['Sent to server: PVDZ_plr_Login1', PVDZ_plr_Login1];};" \n
"PVDZ_send = [player,""dayzSetDate"",[player]];" \n
"publicVariableServer ""PVDZ_send"";" \n
"diag_log ['Sent to server: PVDZ_send', PVDZ_send]; " \n
"if (DZE_playerFSMDebug == 1) then {diag_log ['Sent to server: PVDZ_send', PVDZ_send];};" \n
"_myTime = diag_tickTime;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -471,7 +470,7 @@ class FSM
{
name = "Parse_Login";
itemno = 13;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Parse_Login'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Parse_Login'];};" \n
"dayz_progressBarValue = 0.8;" \n
"_charID = _msg select 0;" \n
"_inventory = _msg select 1;" \n
@@ -497,12 +496,12 @@ class FSM
" _characterCoins = _msg select 11;" \n
" _globalCoins = _msg select 12;" \n
" _bankCoins = _msg select 13;" \n
" diag_log (""PLAYER RESULT: "" + str(_isHiveOk));" \n
" if (DZE_playerFSMDebug == 1) then {diag_log (""PLAYER RESULT: "" + str(_isHiveOk));};" \n
"};" \n
"" \n
"dayz_loadScreenMsg = localize 'str_player_creating_character'; " \n
"if (_isHiveOk) then { if (!_schedulerStarted) then { _schedulerStarted=true; execVM '\z\addons\dayz_code\system\scheduler\sched_init.sqf'; }; };" \n
"if (_debug == 1) then {" \n
"if (DZE_playerFSMDebug == 1) then {" \n
"diag_log (""PLOGIN: authenticated with : "" + str(_msg));" \n
" diag_log [""player_monitor:Parse_Login _isHiveOk,_isNew,isnil preload, preload:"",_isHiveOk,_isNew,!isNil 'dayz_preloadFinished',dayz_preloadFinished];" \n
"};" \n
@@ -583,7 +582,7 @@ class FSM
{
name = "ERROR__Wrong_HIVE";
itemno = 15;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'ERROR__Wrong_HIVE'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'ERROR__Wrong_HIVE'];};" \n
"_myTime = diag_tickTime;" \n
"dayz_loadScreenMsg = localize 'str_player_wrong_hive';" \n
""/*%FSM</STATEINIT""">*/;
@@ -609,7 +608,7 @@ class FSM
{
name = "Phase_One";
itemno = 17;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Phase_One'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Phase_One'];};" \n
"if ((!isNil ""dayz_selectGender"") && {(!isNil ""DZE_defaultSkin"") && (_isInfected == 0)}) then {" \n
" if (dayz_selectGender == ""Survivor2_DZ"") then {" \n
" _rand = (DZE_defaultSkin select 0) call BIS_fnc_selectRandom;" \n
@@ -711,7 +710,7 @@ class FSM
"PVCDZ_plr_Login2 = [];" \n
"PVDZ_plr_Login2 = [_charID,player,_playerUID,_spawnSelection,_inventory];" \n
"publicVariableServer ""PVDZ_plr_Login2"";" \n
"diag_log ['Sent to server: PVDZ_plr_Login2', PVDZ_plr_Login2]; " \n
"if (DZE_playerFSMDebug == 1) then {diag_log ['Sent to server: PVDZ_plr_Login2', PVDZ_plr_Login2];};" \n
"dayz_loadScreenMsg = localize 'str_player_requesting_character';" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -736,7 +735,7 @@ class FSM
{
name = "Phase_Two";
itemno = 19;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Phase_Two'];};dayz_loadScreenMsg = localize 'str_login_characterData'; " \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Phase_Two'];};dayz_loadScreenMsg = localize 'str_login_characterData'; " \n
"" \n
"_worldspace = PVCDZ_plr_Login2 select 0;" \n
"_state = PVCDZ_plr_Login2 select 1;" \n
@@ -918,7 +917,7 @@ class FSM
{
name = "ERROR__Player_Already";
itemno = 21;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'ERROR__Player_Already'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'ERROR__Player_Already'];};" \n
"selectNoPlayer;" \n
"_myTime = diag_tickTime;" \n
"dayz_loadScreenMsg = localize 'str_login_alreadyDead';" \n
@@ -945,7 +944,7 @@ class FSM
{
name = "Position";
itemno = 23;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Position'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Position'];};" \n
"dayz_progressBarValue = 0.85;" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -981,7 +980,7 @@ class FSM
{
name = "Load_In";
itemno = 25;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Load_In'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Load_In'];};" \n
"dayz_progressBarValue = 0.95;" \n
"dayz_loadScreenMsg = localize 'str_player_setup_completed';" \n
"_torev4l=nearestObjects [_setPos, Dayz_plants + DayZ_GearedObjects + [""AllVehicles"",""WeaponHolder""], 50];" \n
@@ -1056,7 +1055,7 @@ class FSM
{
name = "Preload_Display";
itemno = 29;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Preload_Display'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Preload_Display'];};" \n
"" \n
"player disableConversation true;" \n
"" \n
@@ -1143,7 +1142,7 @@ class FSM
{
name = "Initialize";
itemno = 31;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Initialize'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Initialize'];};" \n
"" \n
"//Medical" \n
"//dayz_medicalH = [] execVM ""\z\addons\dayz_code\medical\init_medical.sqf""; //Medical Monitor Script (client only)" \n
@@ -1210,7 +1209,7 @@ class FSM
{
name = "Finish";
itemno = 32;
init = /*%FSM<STATEINIT""">*/"diag_log 'player_forceSave called from fsm';" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log 'player_forceSave called from fsm';};" \n
"//call player_forceSave;" \n
"" \n
"//Check for bad controls at login" \n
@@ -1228,7 +1227,7 @@ class FSM
{
name = "Enable_Sim";
itemno = 38;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Enable_Sim'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Enable_Sim'];};" \n
"" \n
"_myAssets = getText(configFile >> ""CfgPatches"" >> ""dayz_communityassets"" >> ""dayzVersion"");" \n
"_mySfx = getNumber(configFile >> ""CfgPatches"" >> ""dayz_sfx"" >> ""dayzVersion"");" \n
@@ -1247,7 +1246,7 @@ class FSM
"_myWeapons = getNumber(configFile >> ""CfgPatches"" >> ""dayz_weapons"" >> ""dayzVersion"");" \n
"*/" \n
"" \n
"if (_debug == 1) then {" \n
"if (DZE_playerFSMDebug == 1) then {" \n
" diag_log format[""DayZ Version: DayZ_Anim: %1 DayZ_SFX: %2 DayZ_Assets: %3"",_myAnim, _mySfx,_myAssets];" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1283,7 +1282,7 @@ class FSM
{
name = "ERROR__Client_Files";
itemno = 40;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'ERROR__Client_Files'];};selectNoPlayer;" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'ERROR__Client_Files'];};selectNoPlayer;" \n
"_myTime = diag_tickTime;" \n
"dayz_loadScreenMsg = localize 'str_player_outdated';" \n
""/*%FSM</STATEINIT""">*/;
@@ -1309,7 +1308,7 @@ class FSM
{
name = "Stream";
itemno = 42;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Stream'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Stream'];};" \n
"dayz_loadScreenMsg = localize 'str_login_spawningLocalObjects';" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1334,14 +1333,14 @@ class FSM
{
name = "Retry";
itemno = 46;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Retry'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Retry'];};" \n
"dayz_loadScreenMsg = localize 'str_player_retrying';" \n
"" \n
"_AuthAttempt = _AuthAttempt +1;" \n
"" \n
"_myTime = diag_tickTime;" \n
"" \n
"if (_debug == 1) then {" \n
"if (DZE_playerFSMDebug == 1) then {" \n
" diag_log (""PLOGIN: Retrying Authentication... ("" + _playerUID + "")"");" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1377,9 +1376,9 @@ class FSM
{
name = "get_ready_to_clo";
itemno = 48;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'get_ready_to_clo'];};dayz_loadScreenMsg = localize 'str_player_authentication_failed';" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'get_ready_to_clo'];};dayz_loadScreenMsg = localize 'str_player_authentication_failed';" \n
"_myTime = diag_tickTime;" \n
"if (_debug == 1) then {" \n
"if (DZE_playerFSMDebug == 1) then {" \n
" diag_log (""PLOGIN: Authentication Failed ("" + _playerUID + "")"");" \n
"};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1404,11 +1403,11 @@ class FSM
{
name = "Disconnect";
itemno = 50;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Disconnect'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Disconnect'];};" \n
"" \n
" player enableSimulation false;" \n
"" \n
"if (_debug == 1) then {" \n
"if (DZE_playerFSMDebug == 1) then {" \n
" diag_log (""End Mission"");" \n
"};" \n
"" \n
@@ -1429,7 +1428,7 @@ class FSM
{
name = "Date_or_Time_Send";
itemno = 52;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Date_or_Time_Send'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Date_or_Time_Send'];};" \n
"_myTime = diag_tickTime;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
@@ -1442,9 +1441,9 @@ class FSM
to="Stream";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!isNil ""dayzSetDate"""/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"diag_log ['Date & time received:', dayzSetDate];" \n
action=/*%FSM<ACTION""">*/"if (DZE_playerFSMDebug == 1) then {diag_log ['Date & time received:', dayzSetDate];};" \n
"setDate dayzSetDate;" \n
"diag_log ['Local date on this client:', date];"/*%FSM</ACTION""">*/;
"if (DZE_playerFSMDebug == 1) then {diag_log ['Local date on this client:', date];};"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "no_Time_Date">*/
@@ -1466,10 +1465,10 @@ class FSM
{
name = "Server_Loading";
itemno = 54;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Server_Loading'];};_myTime = diag_tickTime;" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Server_Loading'];};_myTime = diag_tickTime;" \n
"dayz_loadScreenMsg = localize 'str_player_waiting_start';" \n
"" \n
"if (_debug == 1) then {" \n
"if (DZE_playerFSMDebug == 1) then {" \n
" diag_log (""Server Loading"");" \n
" diag_log (""PLOGIN: Waiting for server to start authentication"");" \n
"};"/*%FSM</STATEINIT""">*/;
@@ -1506,7 +1505,7 @@ class FSM
{
name = "Gender_Selection";
itemno = 58;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Gender_Selection'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Gender_Selection'];};" \n
"endLoadingScreen;" \n
"freshSpawn = 2;" \n
"" \n
@@ -1549,7 +1548,7 @@ class FSM
{
name = "Character_Type_6";
itemno = 60;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Character_Type_6'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Character_Type_6'];};" \n
"" \n
"_model = dayz_selectGender;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1585,7 +1584,7 @@ class FSM
{
name = "Region_Selection";
itemno = 61;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Region_Selection'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Region_Selection'];};" \n
"endLoadingScreen;" \n
"" \n
"_timeNem=diag_tickTime;" \n
@@ -1627,7 +1626,7 @@ class FSM
{
name = "Region_Process_6";
itemno = 63;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Region_Process_6, region selected:',_spawnSelection];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Region_Process_6, region selected:',_spawnSelection];};" \n
"_isNew = false;" \n
"_spawnSelection = dayz_selectRegion;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1654,7 +1653,7 @@ class FSM
{
name = "Spawn_Process_65";
itemno = 65;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Spawn_Process_65'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Spawn_Process_65'];};" \n
"_isNew = false;" \n
"dayz_selectRegion = 9;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1681,7 +1680,7 @@ class FSM
{
name = "ERROR__Date_Time";
itemno = 72;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'ERROR__Date_Time'];};_myTime = diag_tickTime;" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'ERROR__Date_Time'];};_myTime = diag_tickTime;" \n
"" \n
"diag_log format[""Date and time not synced""];" \n
"dayz_loadScreenMsg = localize 'str_player_desync';" \n
@@ -1733,7 +1732,7 @@ class FSM
{
name = "Waiting_for_Gender";
itemno = 90;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Waiting_for_Gender'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Waiting_for_Gender'];};" \n
"" \n
"_timeNemGender = diag_tickTime;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1784,7 +1783,7 @@ class FSM
{
name = "Waiting_for__Region";
itemno = 92;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Waiting_for__Region'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Waiting_for__Region'];};" \n
"" \n
"_timeNemRegion = diag_tickTime;" \n
""/*%FSM</STATEINIT""">*/;
@@ -1838,7 +1837,7 @@ class FSM
{
name = "Update_player";
itemno = 96;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Update_player'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Update_player'];};" \n
"dayz_loadScreenMsg = format[ localize 'str_player_ghost', _timeOut];" \n
"" \n
"_myTime = diag_tickTime;" \n
@@ -1876,7 +1875,7 @@ class FSM
{
name = "Ghost_System";
itemno = 99;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Ghost_System'];};dayz_loadScreenMsg = localize 'str_login_ghostedPlayer';" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Ghost_System'];};dayz_loadScreenMsg = localize 'str_login_ghostedPlayer';" \n
"" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -1952,7 +1951,7 @@ class FSM
{
name = "Finish_1";
itemno = 106;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Finish'];};" \n
init = /*%FSM<STATEINIT""">*/"if (DZE_playerFSMDebug == 1) then {diag_log [diag_tickTime,'Finish'];};" \n
"" \n
"dayz_playerName = if (alive player) then {name player} else {'unknown'};" \n
"PVDZ_plr_LoginRecord = [_playerUID,_charID,0,toArray dayz_playerName];" \n
@@ -1960,7 +1959,7 @@ class FSM
"" \n
"dayz_progressBarValue = 1;" \n
"" \n
"diag_log format ['Sent to server PVDZ_plr_LoginRecord: [%1, %2, %3, %4]',_playerUID,_charID,0,dayz_playerName]; " \n
"if (DZE_playerFSMDebug == 1) then {diag_log format ['Sent to server PVDZ_plr_LoginRecord: [%1, %2, %3, %4]',_playerUID,_charID,0,dayz_playerName];};" \n
"" \n
"_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
@@ -1980,7 +1979,7 @@ class FSM
" call compile preprocessFileLineNumbers (""\z\addons\dayz_code\system\mission\chernarus\infectiousWaterholes\""+_x+"".sqf""); " \n
"} count infectedWaterHoles;" \n
" " \n
"diag_log (infectedWaterHoles);"/*%FSM</STATEINIT""">*/;
"if (DZE_playerFSMDebug == 1) then {diag_log (infectedWaterHoles);};"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{

View File

@@ -85,6 +85,6 @@ sched_animals = {
};
};
};
// diag_log format [ "%1: update animals. local: %5, global: %6 fps: %2 -> %3%4",__FILE__, _min, diag_fpsmin,if (diag_fpsmin < 10) then {"!! <<<<<<<<<<<<<<<<<<<"} else {""}, _count, _global ];
if (DZE_schedDebug == 1) then {diag_log format [ "%1: update animals. local: %5, global: %6 fps: %2 -> %3%4",__FILE__, _min, diag_fpsmin,if (diag_fpsmin < 10) then {"!! <<<<<<<<<<<<<<<<<<<"} else {""}, _count, _global ];};
objNull
};

View File

@@ -6,7 +6,7 @@
*/
sched_antiTP_init = {
diag_log [ diag_ticktime, __FILE__, "Anti Teleport inited"];
if (DZE_schedDebug == 1) then {diag_log [ diag_ticktime, __FILE__, "Anti Teleport inited"];};
[true, [], 0, 0, objNull, respawn_west_original]
};

View File

@@ -63,4 +63,4 @@ if (count _list == 0) then {
};
_list execFSM (_base+"scheduler.fsm");
diag_log [ diag_tickTime, __FILE__, "Scheduler started"];
//diag_log [ diag_tickTime, __FILE__, "Scheduler started"];

View File

@@ -1,7 +1,7 @@
// (c) facoptere@gmail.com, licensed to DayZMod for the community
sched_security_init = {
diag_log [ diag_ticktime, __FILE__, "Some security routines inited"];
if (DZE_schedDebug == 1) then {diag_log [ diag_ticktime, __FILE__, "Some security routines inited"];};
[ "", time, 0, 0, grpNull ]
};

View File

@@ -97,4 +97,4 @@ if (_currentRain == 0 || {_currentOvercast <= .70} || {DZE_Weather in [3,4]}) th
if (DEBUG_MESSAGE) then {"The Weather Has Changed" call dayz_rollingMessages;};
diag_log format ["Weather Forecast: Overcast: %1, Fog: %2, Rain: %3, WindX: %4, WindY: %5, Snow: %6, Blizzard: %7, Change Type: %8.",_currentOvercast,_currentFog,_currentRain,_currentWindX,_currentWindY,_currentSnow,_blizzard,_changeType];
if (DEBUG_MESSAGE) then {diag_log format ["Weather Forecast: Overcast: %1, Fog: %2, Rain: %3, WindX: %4, WindY: %5, Snow: %6, Blizzard: %7, Change Type: %8.",_currentOvercast,_currentFog,_currentRain,_currentWindX,_currentWindY,_currentSnow,_blizzard,_changeType];};