Commit d047f4b9 authored by vabene1111's avatar vabene1111
Browse files

fixed spawning randomly on non configured maps

if a map is not configured in desolation/config.cpp (or any override) the variable DS_var_SpawnSetting is not set thus cannot be read in on region selected. This fixes it by adding a check and spawning randomly if the var does not exist since witouht any configuration spawning randomly is the only option anyway.
parent 3140d2ec
......@@ -15,12 +15,17 @@ params["_regionNum"];
diag_log "<Desolation>: INFO: On region select #1";
// [[_marker,_text,_icon,_mode]];
private _settings = ((DS_var_SpawnSettings) select _regionNum);
private _marker = "";
private _mode = 1;
private _marker = ((_settings) select 0);
private _mode = ((_settings) select 3);
if(_mode isEqualType []) then {
_mode = selectRandom _mode;
if !(isNil "DS_var_SpawnSettings") then {
private _settings = ((DS_var_SpawnSettings) select _regionNum);
_marker = ((_settings) select 0);
_mode = ((_settings) select 3);
if(_mode isEqualType []) then {
_mode = selectRandom _mode;
};
};
// Spawn player at position
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment