From 97a90c52e07846522d29ffa48d26dd4895379429 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 8 Jan 2017 19:44:00 +0100 Subject: [PATCH] - fixed: Particles should disappear if their alpha goes below zero. --- src/p_effect.cpp | 2 +- src/p_sight.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/p_effect.cpp b/src/p_effect.cpp index 44dc17971..e0679338d 100644 --- a/src/p_effect.cpp +++ b/src/p_effect.cpp @@ -273,7 +273,7 @@ void P_ThinkParticles () auto oldtrans = particle->alpha; particle->alpha -= particle->fadestep; particle->size += particle->sizestep; - if (oldtrans < particle->alpha || --particle->ttl <= 0 || (particle->size <= 0)) + if (particle->alpha <= 0 || oldtrans < particle->alpha || --particle->ttl <= 0 || (particle->size <= 0)) { // The particle has expired, so free it memset (particle, 0, sizeof(particle_t)); if (prev) diff --git a/src/p_sight.cpp b/src/p_sight.cpp index 40a392f32..9ee543c8a 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -821,11 +821,6 @@ bool P_CheckSight (AActor *t1, AActor *t2, int flags) return false; } - if (t2->player) - { - int a = 0; - } - const sector_t *s1 = t1->Sector; const sector_t *s2 = t2->Sector; int pnum = int(s1->Index()) * level.sectors.Size() + int(s2->Index());