Less overpowered (in terms of bunkers) QRTZ

Newly grown QRTZ now inherits the temperature of the particle that created it
and PQRT doesn't start growing in midair immediately after it's been shattered
This commit is contained in:
jacksonmj 2014-05-22 03:50:04 +01:00
parent 21532821b7
commit 2946030517

View File

@ -57,8 +57,11 @@ int Element_QRTZ::update(UPDATE_FUNC_ARGS)
if (parts[i].pavg[1]-parts[i].pavg[0] > 0.05*(parts[i].temp/3) || parts[i].pavg[1]-parts[i].pavg[0] < -0.05*(parts[i].temp/3))
{
sim->part_change_type(i,x,y,PT_PQRT);
parts[i].life = 5; //timer before it can grow or diffuse again
}
}
if (parts[i].life>5)
parts[i].life = 5;
// absorb SLTW
if (parts[i].tmp != -1)
for (rx=-1; rx<2; rx++)
@ -75,7 +78,7 @@ int Element_QRTZ::update(UPDATE_FUNC_ARGS)
}
}
// grow and diffuse
if (parts[i].tmp > 0)
if (parts[i].tmp > 0 && (parts[i].vx*parts[i].vx + parts[i].vy*parts[i].vy)<0.2f && parts[i].life<=0)
{
bool stopgrow = false;
int rnd, sry, srx;
@ -96,8 +99,14 @@ int Element_QRTZ::update(UPDATE_FUNC_ARGS)
np = sim->create_part(-1,x+srx,y+sry,PT_QRTZ);
if (np>-1)
{
parts[np].temp = parts[i].temp;
parts[np].tmp2 = parts[i].tmp2;
parts[i].tmp--;
if (t == PT_PQRT)
{
// If PQRT is stationary and has started growing particles of QRTZ, the PQRT is basically part of a new QRTZ crystal. So turn it back into QRTZ so that it behaves more like part of the crystal.
sim->part_change_type(i,x,y,PT_QRTZ);
}
if (rand()%2)
{
parts[np].tmp=-1;//dead qrtz