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

This commit is contained in:
jacob1 2014-12-15 15:52:08 -05:00
parent 35782fdd10
commit 0f583f3bd8
3 changed files with 27 additions and 12 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;
}