summaryrefslogtreecommitdiff
path: root/src/simulation/elements/SPRK.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements/SPRK.cpp')
-rw-r--r--src/simulation/elements/SPRK.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/elements/SPRK.cpp b/src/simulation/elements/SPRK.cpp
index aa2efeb..4cccdbb 100644
--- a/src/simulation/elements/SPRK.cpp
+++ b/src/simulation/elements/SPRK.cpp
@@ -56,7 +56,7 @@ int Element_SPRK::update(UPDATE_FUNC_ARGS)
{
if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR)
parts[i].temp = R_TEMP + 273.15f;
- if (ct<=0 || ct>=PT_NUM)
+ if (ct<=0 || ct>=PT_NUM || !sim->elements[parts[i].ctype].Enabled)
ct = PT_METL;
sim->part_change_type(i,x,y,ct);
parts[i].ctype = PT_NONE;