mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-15 17:44:25 +02:00
fix #128
This commit is contained in:
@@ -234,9 +234,7 @@ struct MuzzleFlash : Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void update() {
|
virtual void update() {
|
||||||
if (timer < MUZZLE_FLASH_TIME) {
|
|
||||||
timer += Core::deltaTime;
|
timer += Core::deltaTime;
|
||||||
|
|
||||||
if (timer < MUZZLE_FLASH_TIME) {
|
if (timer < MUZZLE_FLASH_TIME) {
|
||||||
float intensity = clamp((MUZZLE_FLASH_TIME - timer) * 20.0f, EPS, 1.0f);
|
float intensity = clamp((MUZZLE_FLASH_TIME - timer) * 20.0f, EPS, 1.0f);
|
||||||
|
|
||||||
@@ -258,7 +256,6 @@ struct MuzzleFlash : Controller {
|
|||||||
game->removeEntity(this);
|
game->removeEntity(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
virtual void render(Frustum *frustum, MeshBuilder *mesh, Shader::Type type, bool caustics) {
|
virtual void render(Frustum *frustum, MeshBuilder *mesh, Shader::Type type, bool caustics) {
|
||||||
ASSERT(level->extra.muzzleFlash);
|
ASSERT(level->extra.muzzleFlash);
|
||||||
|
Reference in New Issue
Block a user