1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-03-18 18:19:39 +01:00

fix muzzle flash in save data

This commit is contained in:
XProger 2020-01-31 22:54:37 +03:00
parent 7ea08f75b2
commit 780b3e96a6

View File

@ -237,7 +237,16 @@ struct MuzzleFlash : Controller {
timer = 0.0f;
}
virtual bool getSaveData(SaveEntity &data) {
return false;
}
virtual void update() {
if (!owner) {
game->removeEntity(this);
return;
}
timer += Core::deltaTime;
if (timer < MUZZLE_FLASH_TIME) {
float intensity = clamp((MUZZLE_FLASH_TIME - timer) * 20.0f, EPS, 1.0f);