diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-30 16:22:33 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-30 16:22:33 (GMT) |
| commit | 856f9574b6bf92c1b15d8e4f1a04869182eb05fb (patch) | |
| tree | e526e307cd8c5b61ccbad09b0c94ddfbdab52cde /src/elements/sprk.c | |
| parent | cb05f5c77ea47e76017f0fc7c5f19495f49d3151 (diff) | |
| download | powder-856f9574b6bf92c1b15d8e4f1a04869182eb05fb.zip powder-856f9574b6bf92c1b15d8e4f1a04869182eb05fb.tar.gz | |
Change LCRy workings and add ELEC (wip)
Diffstat (limited to 'src/elements/sprk.c')
| -rw-r--r-- | src/elements/sprk.c | 7 |
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 |
