mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
dc03dae4bb
- Debris Updates and MD5 unit test - reworked to only use one single hive call. - add debug flag to remove markers by default. - added check to prevent spawning debris on top of each other.
26 lines
802 B
Plaintext
26 lines
802 B
Plaintext
_spawnChance = ((EPOCH_playerNuisance + EPOCH_playerSoiled)/2) max 1;
|
|
if (random _droneRndChance < _spawnChance) then {
|
|
"I_UAV_01_F" call EPOCH_unitSpawnIncrease;
|
|
};
|
|
if (EPOCH_mod_Ryanzombies_Enabled) then {
|
|
if (random _zombieRngChance < _spawnChance) then {
|
|
["EPOCH_RyanZombie_1",12] call EPOCH_unitSpawnIncrease;
|
|
};
|
|
};
|
|
if (random _sapperRndChance < _spawnChance) then {
|
|
"Epoch_Sapper_F" call EPOCH_unitSpawnIncrease;
|
|
};
|
|
// diag_log format["DEBUG: _spawnChance %1",_spawnChance];
|
|
|
|
_spawnUnits = [];
|
|
{
|
|
if (_x > 0) then{
|
|
_spawnUnits pushBack(EPOCH_spawnIndex select _forEachIndex);
|
|
};
|
|
} forEach EPOCH_playerSpawnArray;
|
|
|
|
// test spawning one antagonist every 10 minutes select one unit at random to spawn
|
|
if !(_spawnUnits isEqualTo[]) then{
|
|
(selectRandom _spawnUnits) call EPOCH_unitSpawn;
|
|
};
|