imon's fix to rule them all
might have solved dt anormalities
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) {
|
||||
double& timeSinceDeath = component["TimeSinceDeath"];
|
||||
timeSinceDeath += (double)component["Speed"] * dt;
|
||||
if (timeSinceDeath < 0 || timeSinceDeath > (double)component["ExplosionDuration"]) {
|
||||
timeSinceDeath = 0.0;
|
||||
}
|
||||
}
|
||||
if (delay <= 0) {
|
||||
double& timeSinceDeath = component["TimeSinceDeath"];
|
||||
timeSinceDeath += (double)component["Speed"] * dt;
|
||||
if (timeSinceDeath < 0) {
|
||||
timeSinceDeath = 0.0;
|
||||
}
|
||||
else if (timeSinceDeath >(double)component["ExplosionDuration"]) {
|
||||
timeSinceDeath = (double)component["ExplosionDuration"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user