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 //Used to limit overall zed counts
dayz_tickTimeOffset = 0; dayz_tickTimeOffset = 0;
dayz_currentWeaponHolders = 0; dayz_currentWeaponHolders = 0;
dayz_maxMaxWeaponHolders = 160; dayz_maxMaxWeaponHolders = 80;
dayz_maxCurrentZeds = 0; dayz_maxCurrentZeds = 0;
dayz_inVehicle = false; dayz_inVehicle = false;
dayz_Magazines = []; dayz_Magazines = [];

View File

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

View File

@@ -1,47 +1,75 @@
private ["_handle","_cursor","_delMe","_first","_town","_day","_world","_nearestCity"]; 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 { while {true} do {
_handle = [] spawn player_animalCheck; //add player actions
waitUntil{scriptDone _handle}; 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 if ((diag_tickTime - _timer1) > 60) then {
_cursor = 0; _position = getPosATL player;
_delMe = false; //Current amounts
{ dayz_spawnZombies = {alive _x AND local _x} count (_position nearEntities ["zZombie_Base",200]);
private["_bPos","_isNoone"]; dayz_CurrentNearByZombies = {alive _x} count (_position nearEntities ["zZombie_Base",200]);
_bPos = getPosATL _x; dayz_currentWeaponHolders = count (_position nearObjects ["ReammoBox",100]);
_isNoone = {isPlayer _x} count (_bPos nearEntities ["Man",200]) == 0;
if (_isNoone) then { _timer1 = diag_tickTime;
_x setVariable ["zombied",objNull,true]; };
dayz_buildingMonitor set [_cursor,"DEL"];
_delMe = true; //spawning system
}; if ((diag_tickTime - _spawnCheck) > 14) then {
_cursor = _cursor + 1; ["both"] spawn player_spawnCheck;
} count dayz_buildingMonitor;
if (_delMe) then { _spawnCheck = diag_tickTime;
dayz_buildingMonitor = dayz_buildingMonitor - ["DEL"];
}; };
//Check if new day //Check if new day
_day = round(360 * (dateToNumber date)); if ((diag_tickTime - _NewDay) > 5) then {
if(dayz_currentDay != _day) then { private "_day";
dayz_sunRise = call world_sunRise; _day = round(360 * (dateToNumber date));
dayz_currentDay = _day; if(dayz_currentDay != _day) then {
}; dayz_sunRise = call world_sunRise;
dayz_currentDay = _day;
};
_world = toUpper(worldName); //toUpper(getText (configFile >> "CfgWorlds" >> (worldName) >> "description")); _NewDay = diag_tickTime;
_nearestCity = nearestLocations [([player] call FNC_GetPos), ["NameCityCapital","NameCity","NameVillage","NameLocal"],300];
_world = toUpper(worldName); //toUpper(getText (configFile >> "CfgWorlds" >> (worldName) >> "description"));
if (count _nearestCity > 0) then { _nearestCity = nearestLocations [([player] call FNC_GetPos), ["NameCityCapital","NameCity","NameVillage","NameLocal"],300];
_town = text (_nearestCity select 0);
if(dayz_PreviousTown == "Wilderness") then { 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; dayz_PreviousTown = _town;
}; };
if(_town != dayz_PreviousTown) then {
_first = [_world,_town,""] spawn BIS_fnc_infoText;
};
dayz_PreviousTown = _town;
}; };
//wait //wait
sleep 5; sleep 0.001;
}; };