Prevent race condition when enabling objectives.

This commit is contained in:
Steve 2017-06-21 08:41:27 +01:00
parent c41a69f363
commit 61bf77b288
1 changed files with 4 additions and 0 deletions

View File

@ -269,8 +269,12 @@ void activateObjectives(char *objectives)
if (strcmp(token, o->id) == 0)
{
addHudMessage(colors.cyan, _("New Objective : %s"), o->description);
o->active = 1;
/* prevent race condition */
doObjectives();
if (o->isEliminateAll)
{
updateObjective(o->targetName, o->targetType);