Merge branch 'master' into Dirtybit
# Conflicts: # include/Engine/Rendering/ExplosionEffectJob.h # src/Game/Systems/ExplosionEffectSystem.cpp
This commit is contained in:
@@ -7,12 +7,15 @@ void ExplosionEffectSystem::UpdateComponent(EntityWrapper& entity, ComponentWrap
|
||||
delay = std::max(0.0, delay - dt);
|
||||
}
|
||||
|
||||
if (delay <= 0) {
|
||||
Field<double> timeSinceDeath = component["TimeSinceDeath"];
|
||||
timeSinceDeath += (Field<double>)component["Speed"] * dt;
|
||||
if (timeSinceDeath < 0 || timeSinceDeath > (const double&)component["ExplosionDuration"]) {
|
||||
timeSinceDeath = 0.0;
|
||||
}
|
||||
}
|
||||
if (delay <= 0) {
|
||||
Field<double> timeSinceDeath = component["TimeSinceDeath"];
|
||||
timeSinceDeath += (Field<double>)component["Speed"] * dt;
|
||||
if (timeSinceDeath < 0) {
|
||||
timeSinceDeath = 0.0;
|
||||
}
|
||||
else if (timeSinceDeath >(const double&)component["ExplosionDuration"]) {
|
||||
timeSinceDeath = (const double&)component["ExplosionDuration"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user