separate problematic code to see where the segfault happens
This commit is contained in:
parent
30913d9ae1
commit
123a329baf
|
@ -2489,11 +2489,13 @@ void Unit::updateTimedParticles() {
|
||||||
UnitParticleSystem *ps = unitParticleSystems[i];
|
UnitParticleSystem *ps = unitParticleSystems[i];
|
||||||
if(ps != NULL) {
|
if(ps != NULL) {
|
||||||
if(Renderer::getInstance().validateParticleSystemStillExists(ps,rsGame) == true) {
|
if(Renderer::getInstance().validateParticleSystemStillExists(ps,rsGame) == true) {
|
||||||
if(truncateDecimal<float>(ps->getStartTime()) != 0.0 || truncateDecimal<float>(ps->getEndTime()) != 1.0) {
|
float particleStartTime = truncateDecimal<float>(ps->getStartTime());
|
||||||
//printf("Checking for end particle system #%d [%d] [%f] [%f] [%f] [%f]\n",i,ps->shape,truncateDecimal<float>(ps->getStartTime()),truncateDecimal<float>(ps->getEndTime()),truncateDecimal<float>(animProgress),truncateDecimal<float>(lastAnimProgress));
|
float particleEndTime = truncateDecimal<float>(ps->getEndTime());
|
||||||
|
|
||||||
if(truncateDecimal<float>(getAnimProgressAsFloat()) >= 0.99 ||
|
if(particleStartTime != 0.0 || particleEndTime != 1.0) {
|
||||||
truncateDecimal<float>(getAnimProgressAsFloat()) >= truncateDecimal<float>(ps->getEndTime())) {
|
//printf("Checking for end particle system #%d [%d] [%f] [%f] [%f] [%f]\n",i,ps->shape,truncateDecimal<float>(ps->getStartTime()),truncateDecimal<float>(ps->getEndTime()),truncateDecimal<float>(animProgress),truncateDecimal<float>(lastAnimProgress));
|
||||||
|
float animProgressTime = truncateDecimal<float>(getAnimProgressAsFloat());
|
||||||
|
if(animProgressTime >= 0.99 || animProgressTime >= particleEndTime) {
|
||||||
//printf("ENDING particle system [%d]\n",ps->shape);
|
//printf("ENDING particle system [%d]\n",ps->shape);
|
||||||
|
|
||||||
ps->fade();
|
ps->fade();
|
||||||
|
|
Loading…
Reference in New Issue