mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-06 05:07:48 +02:00
fix muzzle flash in save data
This commit is contained in:
@@ -237,7 +237,16 @@ struct MuzzleFlash : Controller {
|
|||||||
timer = 0.0f;
|
timer = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool getSaveData(SaveEntity &data) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
virtual void update() {
|
virtual void update() {
|
||||||
|
if (!owner) {
|
||||||
|
game->removeEntity(this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
Reference in New Issue
Block a user