Disable TownGenerator and plant spawner by default

Junk and plant spawning is disabled by default. It can be enabled via
dayz_townGenerator config variable and positions blacklist (for trader
cities, etc.).

The trader objects spawn code was consolidated to functions.
This commit is contained in:
ebaydayz
2016-04-06 19:44:00 -04:00
parent 181c47d2a4
commit 6a42ef40d3
41 changed files with 134 additions and 550 deletions

View File

@@ -1,24 +1,4 @@
private "_trader";
{
_trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"];
{_trader removeMagazine _x;} count magazines _trader;
removeAllItems _trader;
removeAllWeapons _trader;
removeBackpack _trader;
_trader switchMove "";
_trader setDir (_x select 2);
_trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;";
_trader setUnitAbility 0.6;
_trader disableAI "ANIM";
_trader disableAI "AUTOTARGET";
_trader disableAI "FSM";
_trader disableAI "MOVE";
_trader disableAI "TARGET";
_trader setBehaviour "CARELESS";
_trader forceSpeed 0;
_trader allowDamage false;
_trader enableSimulation false;
} count [
[
["Damsel4",[24732.8,21743.2,0],64.5643],
["Rocker2",[24754.1,21753.2,0],233.194],
["Dr_Hladik_EP1",[24729.2,21755.9,0.016571],104.384],
@@ -43,6 +23,4 @@ private "_trader";
["MVD_Soldier_Marksman",[16890.6,1780.76,0],31.9086],
["Soldier_MG_PMC",[223.627,22712.1,0],129.516],
["GUE_Soldier_MG",[2446.07,3899.76,0],262.573]
];
processInitCommands;
] call server_spawnTraders;