diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 7cad716b..84bbda08 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -2462,7 +2462,7 @@ void Unit::updateTimedParticles() { for(int i = queuedUnitParticleSystemTypes.size() - 1; i >= 0; i--) { UnitParticleSystemType *pst = queuedUnitParticleSystemTypes[i]; if(pst != NULL) { - if(truncateDecimal(pst->getStartTime()) <= truncateDecimal(getAnimProgressAsFloat())) { + if(truncateDecimal(pst->getStartTime()) <= truncateDecimal(getAnimProgressAsFloat())) { //printf("STARTING queued particle system type [%s] [%f] [%f] [%f] [%f]\n",pst->getType().c_str(),truncateDecimal(pst->getStartTime()),truncateDecimal(pst->getEndTime()),truncateDecimal(animProgress),truncateDecimal(lastAnimProgress)); UnitParticleSystem *ups = new UnitParticleSystem(200); @@ -2489,12 +2489,12 @@ void Unit::updateTimedParticles() { UnitParticleSystem *ps = unitParticleSystems[i]; if(ps != NULL) { if(Renderer::getInstance().validateParticleSystemStillExists(ps,rsGame) == true) { - float particleStartTime = truncateDecimal(ps->getStartTime()); - float particleEndTime = truncateDecimal(ps->getEndTime()); + double particleStartTime = truncateDecimal(ps->getStartTime()); + double particleEndTime = truncateDecimal(ps->getEndTime()); if(particleStartTime != 0.0 || particleEndTime != 1.0) { //printf("Checking for end particle system #%d [%d] [%f] [%f] [%f] [%f]\n",i,ps->shape,truncateDecimal(ps->getStartTime()),truncateDecimal(ps->getEndTime()),truncateDecimal(animProgress),truncateDecimal(lastAnimProgress)); - float animProgressTime = truncateDecimal(getAnimProgressAsFloat()); + double animProgressTime = truncateDecimal(getAnimProgressAsFloat()); if(animProgressTime >= 0.99 || animProgressTime >= particleEndTime) { //printf("ENDING particle system [%d]\n",ps->shape);