summaryrefslogtreecommitdiff
path: root/src/elements/sprk.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/sprk.c')
-rw-r--r--src/elements/sprk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/elements/sprk.c b/src/elements/sprk.c
index 93b0b40..623ecb7 100644
--- a/src/elements/sprk.c
+++ b/src/elements/sprk.c
@@ -130,11 +130,16 @@ int update_SPRK(UPDATE_FUNC_ARGS) {
parts[r>>8].life = 9;
}
}
- else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN||(rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2))) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves
+ else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_PUMP||rt==PT_GPMP||rt==PT_HSWC||rt==PT_PBCN)) // PROP_PTOGGLE, Maybe? We seem to use 2 different methods for handling actived elements, this one seems better. Yes, use this one for new elements, PCLN is different for compatibility with existing saves
{
if (ct==PT_PSCN) parts[r>>8].life = 10;
else if (ct==PT_NSCN && parts[r>>8].life>=10) parts[r>>8].life = 9;
}
+ else if ((ct==PT_PSCN||ct==PT_NSCN) && (rt==PT_LCRY&&abs(rx)<2&&abs(ry)<2))
+ {
+ if (ct==PT_PSCN && parts[r>>8].tmp == 0) parts[r>>8].tmp = 2;
+ else if (ct==PT_NSCN && parts[r>>8].tmp == 3) parts[r>>8].tmp = 1;
+ }
// ct = spark from material, rt = spark to material. Make conduct_sprk = 0 if conduction not allowed