Permalink
Browse files

fix PLSM spawning in fusion (allow some stacking), GRVT in O2 fusion

  • Loading branch information...
jacob1 committed Dec 15, 2014
1 parent 35782fd commit 0f583f3bd88553ea8b953f11ca649d714c7a50db
Showing with 27 additions and 12 deletions.
  1. +8 −4 src/simulation/elements/H2.cpp
  2. +8 −4 src/simulation/elements/NBLE.cpp
  3. +11 −4 src/simulation/elements/O2.cpp
@@ -117,11 +117,15 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
parts[j].temp = temp;
parts[j].tmp = 0x1;
}
j = sim->create_part(-1,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
if (j>-1)
rx = x+rand()%3-1, ry = y+rand()%3-1, rt = pmap[ry][rx]&0xFF;
if (sim->can_move[PT_PLSM][rt] || rt == PT_H2)
{
parts[j].temp = temp;
parts[j].tmp |= 4;
j = sim->create_part(-3,rx,ry,PT_PLSM);
if (j>-1)
{
parts[j].temp = temp;
parts[j].tmp |= 4;
}
}
parts[i].temp = temp+750+rand()%500;
sim->pv[y/CELL][x/CELL] += 30;
@@ -74,11 +74,15 @@ int Element_NBLE::update(UPDATE_FUNC_ARGS)
parts[j].temp = temp;
parts[j].tmp = 0x1;
}
j = sim->create_part(-1,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
if (j != -1)
int rx = x+rand()%3-1, ry = y+rand()%3-1, rt = pmap[ry][rx]&0xFF;
if (sim->can_move[PT_PLSM][rt] || rt == PT_NBLE)
{
parts[j].temp = temp;
parts[j].tmp |= 4;
j = sim->create_part(-3,rx,ry,PT_PLSM);
if (j != -1)
{
parts[j].temp = temp;
parts[j].tmp |= 4;
}
}
parts[i].temp = temp+1750+rand()%500;
sim->pv[y/CELL][x/CELL] += 50;
@@ -92,12 +92,19 @@ int Element_O2::update(UPDATE_FUNC_ARGS)
parts[j].temp = MAX_TEMP;
parts[j].tmp = 0x1;
}
j = sim->create_part(-1,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
if (j != -1)
rx = x+rand()%3-1, ry = y+rand()%3-1, r = pmap[ry][rx]&0xFF;
if (sim->can_move[PT_PLSM][r] || r == PT_O2)
{
parts[j].temp = MAX_TEMP;
parts[j].tmp |= 4;
j = sim->create_part(-3,rx,ry,PT_PLSM);
if (j > -1)
{
parts[j].temp = MAX_TEMP;
parts[j].tmp |= 4;
}
}
j = sim->create_part(-3,x,y,PT_GRVT);
if (j != -1)
parts[j].temp = MAX_TEMP;
parts[i].temp = MAX_TEMP;
sim->pv[y/CELL][x/CELL] = 256;
}

0 comments on commit 0f583f3

Please sign in to comment.