Goal controller: Variable definitions

directional-lights
Mark 2016-10-09 10:56:42 +02:00
parent be207737bc
commit f52159b835
1 changed files with 5 additions and 1 deletions

View File

@ -114,12 +114,16 @@ public func OnGoalUpdate(object goal)
return _inherited(goal, ...);
}
var update_req = goal_gui_menu.Symbol != goal->GetID();
var goal_picture_def = goal->~GetPictureDefinition();
var update_req;
if (goal_picture_def)
{
update_req = goal_gui_menu.Symbol != goal_picture_def;
}
else
{
update_req = goal_gui_menu.Symbol != goal->GetID();
}
var goal_picture = goal->~GetPictureName() ?? goal->GetGraphics();
// Only update if something has changed.