diff options
| author | jacob1 <jfu614@gmail.com> | 2013-09-29 00:31:35 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-09-29 00:31:35 (GMT) |
| commit | d1e75c7a50629a7b3026aa078711713fb2a93e11 (patch) | |
| tree | 71b3896bf8910c7309eabd1aaa28d5cfba336196 /src/simulation | |
| parent | 8fc39d659c280ea423ae633f6b0c0f7c94d8d81f (diff) | |
| download | powder-d1e75c7a50629a7b3026aa078711713fb2a93e11.zip powder-d1e75c7a50629a7b3026aa078711713fb2a93e11.tar.gz | |
make PROT lasers easier to make, adjust velocities needed to make things when smashing PROT together, use FIRE_BLEND for PROT graphics
Diffstat (limited to 'src/simulation')
| -rw-r--r-- | src/simulation/Simulation.cpp | 4 | ||||
| -rw-r--r-- | src/simulation/elements/PROT.cpp | 23 |
2 files changed, 15 insertions, 12 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 3cde255..76c0830 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2218,8 +2218,10 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny) } else if ((r&0xFF) == PT_H2 && pv[y/CELL][x/CELL] < 45.0f) { - create_part(i, x, y, PT_PROT); + part_change_type(i, x, y, PT_PROT); + parts[i].ctype = 0; parts[i].tmp2 = 0x1; + create_part(r>>8, x, y, PT_ELEC); return 1; } diff --git a/src/simulation/elements/PROT.cpp b/src/simulation/elements/PROT.cpp index 21e757c..8cce54e 100644 --- a/src/simulation/elements/PROT.cpp +++ b/src/simulation/elements/PROT.cpp @@ -79,8 +79,9 @@ int Element_PROT::update(UPDATE_FUNC_ARGS) parts[under>>8].life = 40+parts[under>>8].life; } //Powered LCRY reaction: PROT->PHOT - else if (((under&0xFF) == PT_LCRY) && (parts[under>>8].life > 5) && (1>(rand()%10))) { - parts[i].type = PT_PHOT; + else if ((under&0xFF) == PT_LCRY && parts[under>>8].life > 5 && !(rand()%10)) + { + sim->part_change_type(i, x, y, PT_PHOT); parts[i].life *= 2; parts[i].ctype = 0x3FFFFFFF; } @@ -113,15 +114,15 @@ int Element_PROT::update(UPDATE_FUNC_ARGS) if (parts[i].tmp) { int newID, element; - if (parts[i].tmp > 4250) + if (parts[i].tmp > 500000) element = PT_SING; //particle accelerators are known to create earth-destroying black holes - else if (parts[i].tmp > 275) + else if (parts[i].tmp > 500) element = PT_PLUT; - else if (parts[i].tmp > 170) + else if (parts[i].tmp > 320) element = PT_URAN; - else if (parts[i].tmp > 100) + else if (parts[i].tmp > 150) element = PT_PLSM; - else if (parts[i].tmp > 40) + else if (parts[i].tmp > 50) element = PT_O2; else if (parts[i].tmp > 20) element = PT_CO2; @@ -176,12 +177,12 @@ int Element_PROT::DeutImplosion(Simulation * sim, int n, int x, int y, float tem //#TPT-Directive ElementHeader Element_PROT static int graphics(GRAPHICS_FUNC_ARGS) int Element_PROT::graphics(GRAPHICS_FUNC_ARGS) { - *firea = 20; + *firea = 7; *firer = 250; - *fireg = 100; - *fireb = 100; + *fireg = 170; + *fireb = 170; - *pixel_mode |= FIRE_ADD; + *pixel_mode |= FIRE_BLEND; return 1; } |
