mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Don't add damage flash while punch texture modifier is active (#5767)
This commit is contained in:
@@ -1735,7 +1735,7 @@ void GenericCAO::processMessage(const std::string &data)
|
|||||||
m_smgr, m_env, m_position,
|
m_smgr, m_env, m_position,
|
||||||
m_prop.visual_size * BS);
|
m_prop.visual_size * BS);
|
||||||
m_env->addSimpleObject(simple);
|
m_env->addSimpleObject(simple);
|
||||||
} else {
|
} else if (m_reset_textures_timer < 0) {
|
||||||
// TODO: Execute defined fast response
|
// TODO: Execute defined fast response
|
||||||
// Flashing shall suffice as there is no definition
|
// Flashing shall suffice as there is no definition
|
||||||
m_reset_textures_timer = 0.05;
|
m_reset_textures_timer = 0.05;
|
||||||
@@ -1806,11 +1806,13 @@ bool GenericCAO::directReportPunch(v3f dir, const ItemStack *punchitem,
|
|||||||
}
|
}
|
||||||
// TODO: Execute defined fast response
|
// TODO: Execute defined fast response
|
||||||
// Flashing shall suffice as there is no definition
|
// Flashing shall suffice as there is no definition
|
||||||
|
if (m_reset_textures_timer < 0) {
|
||||||
m_reset_textures_timer = 0.05;
|
m_reset_textures_timer = 0.05;
|
||||||
if(result.damage >= 2)
|
if (result.damage >= 2)
|
||||||
m_reset_textures_timer += 0.05 * result.damage;
|
m_reset_textures_timer += 0.05 * result.damage;
|
||||||
updateTextures(m_current_texture_modifier + "^[brighten");
|
updateTextures(m_current_texture_modifier + "^[brighten");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user