Skip to content

Commit

Permalink
(#642): moved wave create function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ansible2 committed Jul 9, 2023
1 parent fabfe1d commit 057d8af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,23 @@ params [
/* ----------------------------------------------------------------------------
Create Queue
---------------------------------------------------------------------------- */
private _generatManClassesFunction = ["generateMenClassnames"] call BLWK_fnc_waves_getFunctionFromConfig;
private _generateSpawnPositionFunction = ["generateManSpawnPosition"] call BLWK_fnc_waves_getFunctionFromConfig;

if (_totalNumEnemiesToSpawnDuringWave < BASE_ENEMY_NUMBER) then {
_totalNumEnemiesToSpawnDuringWave = BASE_ENEMY_NUMBER * ((BLWK_enemiesPerWaveMultiplier * BLWK_currentWaveNumber) + 1);
_totalNumEnemiesToSpawnDuringWave = _totalNumEnemiesToSpawnDuringWave + (BLWK_enemiesPerPlayerMultiplier * (count (call CBAP_fnc_players)));
_totalNumEnemiesToSpawnDuringWave = round _totalNumEnemiesToSpawnDuringWave;
};

private _availableClassnames = call _generatManClassesFunction;

private "_spawnPosition_temp";
if (!BLWK_multipleEnemyPositions) then {
_spawnPosition_temp = selectRandom BLWK_infantrySpawnPositions;
};

private _generatManClassesFunction = ["generateMenClassnames"] call BLWK_fnc_waves_getFunctionFromConfig;
private _availableClassnames = call _generatManClassesFunction;
private _generateSpawnPositionFunction = ["generateManSpawnPosition"] call BLWK_fnc_waves_getFunctionFromConfig;
private _onManCreatedFunctionName = ["generateManSpawnPosition",true] call BLWK_fnc_waves_getFunctionFromConfig;

for "_i" from 1 to _totalNumEnemiesToSpawnDuringWave do {
if (BLWK_multipleEnemyPositions) then {
_spawnPosition_temp = call _generateSpawnPositionFunction;
Expand Down
8 changes: 2 additions & 6 deletions Headers/descriptionEXT/functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,12 +463,6 @@ class BLWK
class handleParatrooperWave
{};
};
class CommonWaveLib
{
file = "Functions\Wave Type Libraries\Common Wave Library";
class wave_create
{};
};
class StandardWaveLib
{
file = "Functions\Wave Type Libraries\Standard Wave Lib";
Expand Down Expand Up @@ -528,6 +522,8 @@ class BLWK
{};
class waves_onInitialized
{};
class waves_create
{};

class addToMustKillList
{};
Expand Down

0 comments on commit 057d8af

Please sign in to comment.