mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
1.8 code merge needed here and revert x2 limit change
This commit is contained in:
@@ -700,7 +700,7 @@ if(!isDedicated) then {
|
||||
//Used to limit overall zed counts
|
||||
dayz_tickTimeOffset = 0;
|
||||
dayz_currentWeaponHolders = 0;
|
||||
dayz_maxMaxWeaponHolders = 160;
|
||||
dayz_maxMaxWeaponHolders = 80;
|
||||
dayz_maxCurrentZeds = 0;
|
||||
dayz_inVehicle = false;
|
||||
dayz_Magazines = [];
|
||||
|
||||
@@ -61,10 +61,6 @@ while {true} do {
|
||||
[] spawn fnc_med_publicBlood;
|
||||
};
|
||||
|
||||
//Add player actions
|
||||
[] call fnc_usec_damageActions;
|
||||
[] call fnc_usec_selfActions;
|
||||
|
||||
//Low Blood Effects
|
||||
if (!r_player_unconscious) then {
|
||||
if (((r_player_blood/r_player_bloodTotal) < 0.35)) then {
|
||||
|
||||
@@ -1,33 +1,59 @@
|
||||
private ["_handle","_cursor","_delMe","_first","_town","_day","_world","_nearestCity"];
|
||||
while {true} do {
|
||||
_handle = [] spawn player_animalCheck;
|
||||
waitUntil{scriptDone _handle};
|
||||
_timer = diag_tickTime;
|
||||
_timer1 = diag_tickTime;
|
||||
_spawnCheck = diag_tickTime;
|
||||
_timer2 = diag_Ticktime;
|
||||
_NewDay = diag_tickTime;
|
||||
|
||||
//check monitored buildings
|
||||
_cursor = 0;
|
||||
_delMe = false;
|
||||
{
|
||||
private["_bPos","_isNoone"];
|
||||
_bPos = getPosATL _x;
|
||||
_isNoone = {isPlayer _x} count (_bPos nearEntities ["Man",200]) == 0;
|
||||
if (_isNoone) then {
|
||||
_x setVariable ["zombied",objNull,true];
|
||||
dayz_buildingMonitor set [_cursor,"DEL"];
|
||||
_delMe = true;
|
||||
while {true} do {
|
||||
//add player actions
|
||||
if ((diag_tickTime - _timer2) > 0.5) then {
|
||||
[] call fnc_usec_damageActions;
|
||||
[] call fnc_usec_selfActions;
|
||||
_timer2 = diag_Ticktime;
|
||||
};
|
||||
_cursor = _cursor + 1;
|
||||
} count dayz_buildingMonitor;
|
||||
if (_delMe) then {
|
||||
dayz_buildingMonitor = dayz_buildingMonitor - ["DEL"];
|
||||
|
||||
if ((diag_tickTime - _timer) > 300) then {
|
||||
//Other Counters
|
||||
dayz_currentGlobalAnimals = count entities "CAAnimalBase";
|
||||
dayz_currentGlobalZombies = count entities "zZombie_Base";
|
||||
|
||||
//Animals
|
||||
[] spawn player_animalCheck;
|
||||
|
||||
_timer = diag_tickTime;
|
||||
};
|
||||
|
||||
if ((diag_tickTime - _timer1) > 60) then {
|
||||
_position = getPosATL player;
|
||||
//Current amounts
|
||||
dayz_spawnZombies = {alive _x AND local _x} count (_position nearEntities ["zZombie_Base",200]);
|
||||
dayz_CurrentNearByZombies = {alive _x} count (_position nearEntities ["zZombie_Base",200]);
|
||||
dayz_currentWeaponHolders = count (_position nearObjects ["ReammoBox",100]);
|
||||
|
||||
_timer1 = diag_tickTime;
|
||||
};
|
||||
|
||||
//spawning system
|
||||
if ((diag_tickTime - _spawnCheck) > 14) then {
|
||||
["both"] spawn player_spawnCheck;
|
||||
|
||||
_spawnCheck = diag_tickTime;
|
||||
};
|
||||
|
||||
//Check if new day
|
||||
if ((diag_tickTime - _NewDay) > 5) then {
|
||||
private "_day";
|
||||
_day = round(360 * (dateToNumber date));
|
||||
if(dayz_currentDay != _day) then {
|
||||
dayz_sunRise = call world_sunRise;
|
||||
dayz_currentDay = _day;
|
||||
|
||||
|
||||
};
|
||||
|
||||
_NewDay = diag_tickTime;
|
||||
|
||||
_world = toUpper(worldName); //toUpper(getText (configFile >> "CfgWorlds" >> (worldName) >> "description"));
|
||||
_nearestCity = nearestLocations [([player] call FNC_GetPos), ["NameCityCapital","NameCity","NameVillage","NameLocal"],300];
|
||||
|
||||
@@ -42,6 +68,8 @@ while {true} do {
|
||||
dayz_PreviousTown = _town;
|
||||
};
|
||||
|
||||
//wait
|
||||
sleep 5;
|
||||
};
|
||||
|
||||
//wait
|
||||
sleep 0.001;
|
||||
};
|
||||
Reference in New Issue
Block a user