diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 16:12:15 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-25 16:12:15 (GMT) |
| commit | 6585a4640b9d1d24d821fb2147fe6182a709f088 (patch) | |
| tree | 4ccbd35c1776955c2933991af5181babe2332f9a /src/simulation/elements/ELEC.cpp | |
| parent | 0afecb5b77442d770f5ebb149f574d87859ebde7 (diff) | |
| download | powder-6585a4640b9d1d24d821fb2147fe6182a709f088.zip powder-6585a4640b9d1d24d821fb2147fe6182a709f088.tar.gz | |
TPT: Replace all explosion sparks with new element (EMBR) 1d5b081942
Diffstat (limited to 'src/simulation/elements/ELEC.cpp')
| -rw-r--r-- | src/simulation/elements/ELEC.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/simulation/elements/ELEC.cpp b/src/simulation/elements/ELEC.cpp index ddaeac7..e9d1f5a 100644 --- a/src/simulation/elements/ELEC.cpp +++ b/src/simulation/elements/ELEC.cpp @@ -67,25 +67,31 @@ int Element_ELEC::update(UPDATE_FUNC_ARGS) continue; if ((r&0xFF)==PT_GLAS) { - //fire_r[y/CELL][x/CELL] += rand()%200; //D: Doesn't work with OpenGL, also shouldn't be here TODO: FIX THIS SHIT - //fire_g[y/CELL][x/CELL] += rand()%200; - //fire_b[y/CELL][x/CELL] += rand()%200; for (rrx=-1; rrx<=1; rrx++) { for (rry=-1; rry<=1; rry++) { if (x+rx+rrx>=0 && y+ry+rry>=0 && x+rx+rrx<XRES && y+ry+rry<YRES) { - nb = sim->create_part(-1, x+rx+rrx, y+ry+rry, PT_BOMB); + nb = sim->create_part(-1, x+rx+rrx, y+ry+rry, PT_EMBR); if (nb!=-1) { - parts[nb].tmp = 1; + parts[nb].tmp = 0; parts[nb].life = 50; - parts[nb].temp = 400.0f; + parts[nb].temp = parts[i].temp*0.8f; parts[nb].vx = rand()%20-10; parts[nb].vy = rand()%20-10; } } } } + //fire_r[y/CELL][x/CELL] += rand()%200; //D: Doesn't work with OpenGL, also shouldn't be here + //fire_g[y/CELL][x/CELL] += rand()%200; + //fire_b[y/CELL][x/CELL] += rand()%200; + /* possible alternative, but doesn't work well at the moment because FIRE_ADD divides firea by 8, so the glow isn't strong enough + create_part(i, x, y, PT_EMBR); + parts[i].tmp = 2; + parts[i].life = 2; + parts[i].ctype = ((rand()%200)<<16) | ((rand()%200)<<8) | (rand()%200); + */ sim->kill_part(i); return 1; } |
