Skip to content

Commit

Permalink
#198 - Use a macro for XEH configs
Browse files Browse the repository at this point in the history
Storing missionconfigFile in a varaible can crash 1.55 dev branch
  • Loading branch information
PabstMirror committed Nov 21, 2015
1 parent 6da4ad1 commit 45a3708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions addons/xeh/init_pre.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if ( isNumber(_cfgRespawn) ) then {
_respawn = !(getNumber(_cfgRespawn) in [0, 1, 4, 5]);
};
if ( isText(_cfgRespawn) ) then {
_respawn = !(getText(_cfgRespawn) in ["none", "bird", "group", "side"]);
_respawn = !((toLower getText(_cfgRespawn)) in ["none", "bird", "group", "side"]);
};

SLX_XEH_objects = []; // Temporary array, to track InitPosts at mission initialization
Expand Down Expand Up @@ -201,9 +201,6 @@ SLX_XEH_OTHER_EVENTS_PLAYERS = [];
}
} forEach SLX_XEH_OTHER_EVENTS;

SLX_XEH_CONFIG_FILES = [configFile, campaignConfigFile, missionConfigFile];
SLX_XEH_CONFIG_FILES_VARIABLE = [campaignConfigFile, missionConfigFile];

SLX_XEH_DEF_CLASSES = [SLX_XEH_STR, "All"];

// XEH for non XEH supported addons
Expand Down
2 changes: 2 additions & 0 deletions addons/xeh/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@

#include "\x\cba\addons\main\script_macros.hpp"

#define SLX_XEH_CONFIG_FILES [configFile, campaignConfigFile, missionConfigFile]
#define SLX_XEH_CONFIG_FILES_VARIABLE [campaignConfigFile, missionConfigFile]

0 comments on commit 45a3708

Please sign in to comment.