Fix for issue 518, Shop "background light" image "candle effect" not working. Basically some bad math made the alpha clamp all the time at its max value of 50. Now we pick a random number distribution between -25 and + 25 for the alpha offset value.
This commit is contained in:
@@ -455,7 +455,7 @@ void GameStateShop::Update(float dt)
|
||||
if (menu && menu->isClosed())
|
||||
SAFE_DELETE(menu);
|
||||
srcCards->Update(dt);
|
||||
alphaChange = static_cast<int> (500 - (int) ((rand() % 1000)) * dt);
|
||||
alphaChange = 25 - static_cast<int>((float) (rand() - 1) / (RAND_MAX) * 50.0f);
|
||||
lightAlpha += alphaChange;
|
||||
if (lightAlpha < 0)
|
||||
lightAlpha = 0;
|
||||
|
||||
Reference in New Issue
Block a user