[News] Add toast if an update is available when the game starts

This commit is contained in:
TheApadayo 2017-06-07 16:04:02 -04:00
parent 2e807e673f
commit 9167a47fcf

View File

@ -133,6 +133,14 @@ namespace Components
Dvar::Var("cl_updateversion").get<Game::dvar_t*>()->current.integer = revisionNumber;
Dvar::Var("cl_updateavailable").get<Game::dvar_t*>()->current.boolean = (revisionNumber > REVISION);
// if there is an update then show the toast, but only once
static bool showToast = true;
if (revisionNumber > REVISION && showToast)
{
Toast::Show("cardicon_gears", "^4Update Available", "There is an update available for your client!", 5000);
showToast = false;
}
}
}