Skip to content

Commit

Permalink
GAS+CAUS+pressure = RFRG, move HEAC to solids
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Jun 19, 2017
1 parent 5de384c commit 2e4617c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/simulation/Simulation.cpp
Expand Up @@ -2195,7 +2195,7 @@ int Simulation::eval_move(int pt, int nx, int ny, unsigned *rr)
switch (r&0xFF)
{
case PT_LCRY:
if (pt==PT_PHOT || pt==PT_ELEC)
if (pt==PT_PHOT)
result = (parts[r>>8].life > 5)? 2 : 0;
break;
case PT_GPMP:
Expand Down
10 changes: 9 additions & 1 deletion src/simulation/elements/CAUS.cpp
Expand Up @@ -55,7 +55,15 @@ int Element_CAUS::update(UPDATE_FUNC_ARGS)
r = pmap[y+ry][x+rx];
if (!r)
continue;
if ((r&0xFF)!=PT_ACID && (r&0xFF)!=PT_CAUS)
if ((r&0xFF) == PT_GAS)
{
if (sim->pv[(y+ry)/CELL][(x+rx)/CELL] > 3)
{
sim->part_change_type(r>>8, x+rx, y+ry, PT_RFRG);
sim->part_change_type(i, x, y, PT_RFRG);
}
}
else if ((r&0xFF)!=PT_ACID && (r&0xFF)!=PT_CAUS && (r&0xFF)!=PT_RFRG && (r&0xFF)!=PT_RFGL)
{
if (((r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PCLN && sim->elements[r&0xFF].Hardness>(rand()%1000))&&parts[i].life>=50)
{
Expand Down
2 changes: 1 addition & 1 deletion src/simulation/elements/HEAC.cpp
Expand Up @@ -9,7 +9,7 @@ Element_HEAC::Element_HEAC()
Name = "HEAC";
Colour = PIXPACK(0xCB6351);
MenuVisible = 1;
MenuSection = SC_SPECIAL;
MenuSection = SC_SOLIDS;
Enabled = 1;

Advection = 0.0f;
Expand Down

0 comments on commit 2e4617c

Please sign in to comment.