From 9bf5eeeef919260458637e84f3388b4d7d8204c5 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Tue, 4 Dec 2012 19:38:01 +0000 Subject: [PATCH] Fix slight particle order issue with SWCH --- src/simulation/elements/SWCH.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/elements/SWCH.cpp b/src/simulation/elements/SWCH.cpp index 818af2700..422b7b55d 100644 --- a/src/simulation/elements/SWCH.cpp +++ b/src/simulation/elements/SWCH.cpp @@ -76,7 +76,7 @@ int Element_SWCH::update(UPDATE_FUNC_ARGS) parts[i].life = parts[r>>8].life; } } - else if (rt==PT_SPRK&&parts[i].life==10&&parts[r>>8].ctype!=PT_PSCN&&parts[r>>8].ctype!=PT_NSCN) { + else if (rt==PT_SPRK && parts[i].life==10 && parts[r>>8].life>0 && parts[r>>8].ctype!=PT_PSCN && parts[r>>8].ctype!=PT_NSCN) { sim->part_change_type(i,x,y,PT_SPRK); parts[i].ctype = PT_SWCH; parts[i].life = 4;