diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2011-10-13 14:32:23 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-13 16:33:22 (GMT) |
| commit | af21bcd353ae76a15364dfec3bd1c4c568845d39 (patch) | |
| tree | 69b8a613db33cb532d8b9946e90b7e70baffc850 /src/elements/sprk.c | |
| parent | 9dc154f1f1667bb7fc73aca6bd5d6fad7c381a0e (diff) | |
| download | powder-af21bcd353ae76a15364dfec3bd1c4c568845d39.zip powder-af21bcd353ae76a15364dfec3bd1c4c568845d39.tar.gz | |
Some changes to LIGH/EMP/TESC based on changes in MaksProg's mod v0.3
Weaker and shorter EMP flash.
TESC has correct tmp value when created with replace mode.
LIGH harms STKM.
Gravity affects LIGH in create_part if p==-2, instead of in update_LIGH,
so that TESC lightning is not affected by gravity.
Diffstat (limited to 'src/elements/sprk.c')
| -rw-r--r-- | src/elements/sprk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/sprk.c b/src/elements/sprk.c index f8f64f8..efab62e 100644 --- a/src/elements/sprk.c +++ b/src/elements/sprk.c @@ -61,7 +61,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) { r = pmap[y+ry][x+rx]; - if ((r>>8)>=NPART || r) + if (r) continue; if (rand()%(parts[i].tmp*parts[i].tmp/20+6)==0) { @@ -70,7 +70,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) { { if(parts[i].tmp<=4) //Prevent Arithmetic errors with zero values continue; - parts[p].life=rand()%(2+parts[i].tmp/15)+4+parts[i].tmp/7; + parts[p].life=rand()%(2+parts[i].tmp/15)+parts[i].tmp/7; if (parts[i].life>60) parts[i].life=60; parts[p].temp=parts[p].life*parts[i].tmp/2.5; |
