mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-10-07 18:19:34 +03:00
Allow Admins To Customize Loot Spawn Timer
This will make it easier for admins to customize the timer between loot spawning. Variable default of 10 moved to variables.sqf.
This commit is contained in:
1 parent
c95303bc9b
commit
732e4c407c
1 file changed
+3
-3
@@ -109,13 +109,13 @@ if (_nearbyCount < 1) exitwith
|
||||
_dateNow = (DateToNumber date);
|
||||
_age = (_dateNow - _looted) * 525948;
|
||||
//diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
|
||||
if ((_age > 10) and (!_cleared)) then {
|
||||
if ((_age > DZE_LootSpawnTimer) and (!_cleared)) then {
|
||||
_nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
|
||||
{deleteVehicle _x} forEach _nearByObj;
|
||||
_x setVariable ["cleared",true,true];
|
||||
_x setVariable ["looted",_dateNow,true];
|
||||
};
|
||||
if ((_age > 10) and (_cleared)) then {
|
||||
if ((_age > DZE_LootSpawnTimer) and (_cleared)) then {
|
||||
//Register
|
||||
_x setVariable ["looted",_dateNow,true];
|
||||
//cleanup
|
||||
@@ -148,4 +148,4 @@ if (_nearbyCount < 1) exitwith
|
||||
};
|
||||
};
|
||||
} forEach _nearby;
|
||||
// ["player_spawnCheck.sqf",(diag_tickTime - _t1)] call fnc_dump;
|
||||
// ["player_spawnCheck.sqf",(diag_tickTime - _t1)] call fnc_dump;
|
||||
Reference in new issue
Block a user