TPT: Return 0 after particle type change

This commit is contained in:
Simon Robertshaw 2012-06-13 00:58:33 +01:00
parent 427670682f
commit c63de0ff6d

View File

@ -67,7 +67,10 @@ int Element_EXOT::update(UPDATE_FUNC_ARGS) {
if (parts[i].tmp>245)
if (1>rand()%500)
if ((r&0xFF)!=PT_EXOT && (r&0xFF)!=PT_BREC && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PRTI && (r&0xFF)!=PT_PRTO && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_PHOT && (r&0xFF)!=PT_VOID && (r&0xFF)!=PT_NBHL && (r&0xFF)!=PT_WARP)
{
sim->create_part(i, x, y, parts[r>>8].type);
return 0;
}
}
parts[i].tmp--;
parts[i].tmp2--;
@ -80,6 +83,7 @@ int Element_EXOT::update(UPDATE_FUNC_ARGS) {
parts[i].tmp2 = 6000;
sim->part_change_type(i, x, y, PT_WARP);
parts[i].temp = 10000;
return 0;
}
else
sim->pv[y/CELL][x/CELL] += (parts[i].tmp2*CFDS)/160000;
@ -87,6 +91,7 @@ int Element_EXOT::update(UPDATE_FUNC_ARGS) {
{
sim->part_change_type(i, x, y, PT_WARP);
parts[i].tmp2 = 6000;
return 0;
}
if (parts[i].tmp2>100)
{