| 24 | EnvironmentController Weather; |
| 25 | |
| 26 | float WeatherParticle::Transparency() const |
| 27 | { |
| 28 | float result = WEATHER_PARTICLE_OPACITY; |
| 29 | float fade = WEATHER_PARTICLE_NEAR_DEATH_LIFE; |
| 30 | |
| 31 | if (Life <= fade) |
| 32 | result *= Life / fade; |
| 33 | |
| 34 | if ((StartLife - Life) < fade) |
| 35 | result *= (StartLife - Life) / fade; |
| 36 | |
| 37 | if (Type != WeatherType::Snow) |
| 38 | result *= 0.35f; |
| 39 | |
| 40 | return result; |
| 41 | } |
| 42 | |
| 43 | EnvironmentController::EnvironmentController() |
| 44 | { |
no outgoing calls
no test coverage detected