1.8 code merge needed here and revert x2 limit change

This commit is contained in:
[VB]AWOL
2014-06-22 17:20:51 -05:00
parent c651816e9f
commit 2bda70b516
3 changed files with 63 additions and 39 deletions

View File

@@ -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 = [];

View File

@@ -60,10 +60,6 @@ while {true} do {
sleep 1;
[] spawn fnc_med_publicBlood;
};
//Add player actions
[] call fnc_usec_damageActions;
[] call fnc_usec_selfActions;
//Low Blood Effects
if (!r_player_unconscious) then {

View File

@@ -1,47 +1,75 @@
private ["_handle","_cursor","_delMe","_first","_town","_day","_world","_nearestCity"];
_timer = diag_tickTime;
_timer1 = diag_tickTime;
_spawnCheck = diag_tickTime;
_timer2 = diag_Ticktime;
_NewDay = diag_tickTime;
while {true} do {
_handle = [] spawn player_animalCheck;
waitUntil{scriptDone _handle};
//add player actions
if ((diag_tickTime - _timer2) > 0.5) then {
[] call fnc_usec_damageActions;
[] call fnc_usec_selfActions;
_timer2 = diag_Ticktime;
};
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;
};
//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;
};
_cursor = _cursor + 1;
} count dayz_buildingMonitor;
if (_delMe) then {
dayz_buildingMonitor = dayz_buildingMonitor - ["DEL"];
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
_day = round(360 * (dateToNumber date));
if(dayz_currentDay != _day) then {
dayz_sunRise = call world_sunRise;
dayz_currentDay = _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;
};
_world = toUpper(worldName); //toUpper(getText (configFile >> "CfgWorlds" >> (worldName) >> "description"));
_nearestCity = nearestLocations [([player] call FNC_GetPos), ["NameCityCapital","NameCity","NameVillage","NameLocal"],300];
if (count _nearestCity > 0) then {
_town = text (_nearestCity select 0);
if(dayz_PreviousTown == "Wilderness") then {
_NewDay = diag_tickTime;
_world = toUpper(worldName); //toUpper(getText (configFile >> "CfgWorlds" >> (worldName) >> "description"));
_nearestCity = nearestLocations [([player] call FNC_GetPos), ["NameCityCapital","NameCity","NameVillage","NameLocal"],300];
if (count _nearestCity > 0) then {
_town = text (_nearestCity select 0);
if(dayz_PreviousTown == "Wilderness") then {
dayz_PreviousTown = _town;
};
if(_town != dayz_PreviousTown) then {
_first = [_world,_town,""] spawn BIS_fnc_infoText;
};
dayz_PreviousTown = _town;
};
if(_town != dayz_PreviousTown) then {
_first = [_world,_town,""] spawn BIS_fnc_infoText;
};
dayz_PreviousTown = _town;
};
//wait
sleep 5;
sleep 0.001;
};