Disable lit fires when townGenerator is off

If townGenerator is enabled lit fires will be created everywhere except
blacklisted areas.
This commit is contained in:
ebaydayz
2016-04-06 20:08:28 -04:00
parent 6a42ef40d3
commit 0f4aa05753
3 changed files with 7 additions and 3 deletions

View File

@@ -1,7 +1,10 @@
// (c) facoptere@gmail.com, licensed to DayZMod for the community
private ["_blocked","_flame","_position"];
{
if (random 1 < 0.33) then {
_blocked = false;
_position = _x;
{if (_position distance _x < 150) exitWith {_blocked = true;};} forEach dayz_townGeneratorBlackList;
if (!_blocked && (random 1 < 0.33)) then {
_flame = createVehicle [ "flamable_DZ", _x, [], 0, "CAN_COLLIDE"];
_flame inflame true;
_flame setVariable ["permaLoot",true]; // = won't be removed by the cleaner, cf. sched_lootpiles.sqf