Skip to content

Commit

Permalink
fix populateArea when grad-civs not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
McDiod committed Sep 8, 2017
1 parent 688973f commit 30175ed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Add the class `cfgGradCivs` to your `description.ext`. Use the following attribu
Attribute | Default Value | Explanation
-------------------------|---------------|------------------------------------------------------------------------------------------------------------------------------------------------
autoInit | 1 | Toggles on automatic initialization of module on missions start (0/1). Turn this off if you want to use functions to set civs properties first.
enableOnFoot | 1 | Enable civilians on foot (0/1).
enableInVehicles | 1 | Enable civilians in vehicles (0/1).
maxCivsOnFoot | 30 | Maximum number of civs on foot.
maxCivsInVehicles | 10 | Maximum number of civs in vehicles.
spawnDistancesOnFoot | [1000,4500] | Minimum and maximum distance to players that civilians on foot can spawn in.
Expand Down
1 change: 1 addition & 0 deletions functions/common/fn_populateArea.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

if (!isServer) exitWith {};
if (!canSuspend) exitWith {_this spawn grad_civs_fnc_populateArea};
if (isNil "GRAD_CIVS_ONFOOTUNITS") exitWith {ERROR("grad-civs has not been initialized.")};

params ["_area",["_amount",20]];

Expand Down
3 changes: 2 additions & 1 deletion functions/spawn/fn_serverLoop.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "..\..\component.hpp"

if (!isServer) exitWith {};
if (!isServer) exitWith {-1};
if (!GRAD_CIVS_ENABLEDINVEHICLES && !GRAD_CIVS_ENABLEDONFOOT) exitWith {-1};

private _mainLoop = {
params ["_args", "_handle"];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grad-civs",
"description": "ambient civilians",
"version": "0.3.0",
"version": "0.3.1",
"contributors": [
{
"name": "nomisum"
Expand Down

0 comments on commit 30175ed

Please sign in to comment.