delay setUnconscious until the settings are inited, fix #148

This commit is contained in:
commy2 2015-09-26 19:30:13 +02:00
parent 5f7c30dd7c
commit 07774647e9

View File

@ -21,6 +21,11 @@
#define DEFAULT_DELAY (round(random(10)+5)) #define DEFAULT_DELAY (round(random(10)+5))
// only run this after the settings are initialized
if !(EGVAR(common,settingsInitFinished)) exitWith {
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setUnconscious), _this];
};
private ["_animState", "_originalPos", "_startingTime", "_isDead"]; private ["_animState", "_originalPos", "_startingTime", "_isDead"];
params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force", false]]; params ["_unit", ["_set", true], ["_minWaitingTime", DEFAULT_DELAY], ["_force", false]];