+ Fixed detection of vehicles in vehicle sell menu
+ Added trade in progress checks to all traders.
+ set pos after direction on deployables when placed.
+ Server side set pos after direction when spawning anything.
This commit is contained in:
vbawol
2013-02-19 08:02:18 -06:00
parent 0dd7227d5c
commit fa5a0902f9
17 changed files with 77 additions and 21 deletions

View File

@@ -76,7 +76,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
_canmove = canmove cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
// hintSilent (typeOf cursorTarget);
_rawmeat = meatraw;
_hasRawMeat = false;

View File

@@ -8,6 +8,8 @@ _maxZombies = dayz_maxLocalZombies;
_maxWildZombies = 3;
_age = -1;
_nearbyBuildings = [];
_radius = 300;
_position = getPosATL player;
@@ -40,6 +42,7 @@ switch (_nearbytype) do {
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies;
if ("ItemMap_Debug" in items player) then {
deleteMarkerLocal "MaxZeds";
deleteMarkerLocal "Counter";
@@ -97,11 +100,13 @@ if (_nearbyCount < 1) exitwith {};
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity] call player_spawnlootCheck;
};
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
if (_spawnZombies) then {
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
};
if (dayz_spawnZombies < _maxZombies) then {
if (_spawnZombies) then {
hintSilent format["Spawning %1 / %2 <br /> total: %3 ",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
};
} else {
hintSilent format["Waiting %1 / %2 <br /> total: %3",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
dayz_spawnWait = time;
dayz_spawnZombies = 0;
};

View File

@@ -9,9 +9,11 @@ _locationstypes = _this select 5;
_nearestCity = _this select 6;
_maxZombies = _this select 7;
/*
if (_inVehicle) then {
_maxZombies = _maxZombies / 2;
};
*/
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);

View File

@@ -27,8 +27,10 @@ if (_doLoiter) then {
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
_agent = createAgent [_type, _position, [], _radius, _method];
dayzSpawnZed = [_agent];
publicVariableServer "dayzSpawnZed";
if(!(_agent == objNull)) then {
dayzSpawnZed = [_agent];
publicVariableServer "dayzSpawnZed";
};
if (_doLoiter) then {
_agent setPosATL _position;