Fix bubblegum flashing, fixes #3133
This commit is contained in:
parent
361e03c375
commit
48f2aa3da4
@ -504,20 +504,16 @@ void Attachment::update(float dt)
|
|||||||
int slow_flashes = stk_config->time2Ticks(3.0f);
|
int slow_flashes = stk_config->time2Ticks(3.0f);
|
||||||
if (is_shield && m_ticks_left < slow_flashes)
|
if (is_shield && m_ticks_left < slow_flashes)
|
||||||
{
|
{
|
||||||
int flashes_per_second = 4;
|
int ticks_per_flash = stk_config->time2Ticks(0.2f);
|
||||||
int ticks_per_flash = stk_config->time2Ticks(0.25f);
|
|
||||||
|
|
||||||
int fast_flashes = stk_config->time2Ticks(0.5f);
|
int fast_flashes = stk_config->time2Ticks(0.5f);
|
||||||
if (m_ticks_left < fast_flashes)
|
if (m_ticks_left < fast_flashes)
|
||||||
{
|
{
|
||||||
flashes_per_second = 12;
|
ticks_per_flash = stk_config->time2Ticks(0.07f);
|
||||||
ticks_per_flash = stk_config->time2Ticks(1.0f/12);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//int divisor = 2;
|
int division = (m_ticks_left / ticks_per_flash);
|
||||||
//int mod = (int)(m_ticks_left * flashes_per_second * 2) % divisor;
|
m_node->setVisible((division & 0x1) == 0);
|
||||||
int mod = m_ticks_left % ticks_per_flash;
|
|
||||||
m_node->setVisible(mod > ticks_per_flash);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_node_scale < m_wanted_node_scale)
|
if (m_node_scale < m_wanted_node_scale)
|
||||||
|
Loading…
Reference in New Issue
Block a user