diff options
| author | jacob1 <jfu614@gmail.com> | 2012-08-10 14:20:05 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2012-09-02 20:48:58 (GMT) |
| commit | d83774602f0e5a547ce171bc1ca785b594018ec6 (patch) | |
| tree | 39a51a670699f78bf129dae34cda7ee16db92063 /src/powder.c | |
| parent | 355dcf50d2292b7505696ffbb85be4daa27a7930 (diff) | |
| download | powder-d83774602f0e5a547ce171bc1ca785b594018ec6.zip powder-d83774602f0e5a547ce171bc1ca785b594018ec6.tar.gz | |
DTEC, generates a spark when something with it's ctype is nearby
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/powder.c b/src/powder.c index ce3e4a9..71e8596 100644 --- a/src/powder.c +++ b/src/powder.c @@ -876,13 +876,14 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a { if (pmap[y][x]) { + int pmaptype = (pmap[y][x]&0xFF); if (( - ((pmap[y][x]&0xFF)==PT_STOR&&!(ptypes[t].properties&TYPE_SOLID))|| - (pmap[y][x]&0xFF)==PT_CLNE|| - (pmap[y][x]&0xFF)==PT_BCLN|| - (pmap[y][x]&0xFF)==PT_CONV|| - ((pmap[y][x]&0xFF)==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN)|| - ((pmap[y][x]&0xFF)==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN) + (pmaptype==PT_STOR&&!(ptypes[t].properties&TYPE_SOLID))|| + pmaptype==PT_CLNE|| + pmaptype==PT_BCLN|| + pmaptype==PT_CONV|| + (pmaptype==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN)|| + (pmaptype==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN) )&&( t!=PT_CLNE&&t!=PT_PCLN&& t!=PT_BCLN&&t!=PT_STKM&& @@ -893,6 +894,11 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a parts[pmap[y][x]>>8].ctype = t; if (t==PT_LIFE && v<NGOLALT && (pmap[y][x]&0xFF)!=PT_STOR) parts[pmap[y][x]>>8].tmp = v; } + else if (pmaptype == PT_DTEC && pmaptype != t) + { + parts[pmap[y][x]>>8].ctype = t; + if (t==PT_LIFE && v<NGOLALT) parts[pmap[y][x]>>8].tmp = v; + } return -1; } if (photons[y][x] && (ptypes[t].properties & TYPE_ENERGY)) @@ -1114,6 +1120,9 @@ inline int create_part(int p, int x, int y, int tv)//the function for creating a case PT_BIZR: case PT_BIZRG: case PT_BIZRS: parts[i].ctype = 0x47FFFF; break; + case PT_DTEC: + parts[i].tmp2 = 2; + break; default: if (t==PT_FIGH) { |
