fix INVS graphics
This commit is contained in:
parent
947660fcd4
commit
4d207b1146
@ -94,7 +94,6 @@ int Element_FIRE::update(UPDATE_FUNC_ARGS)
|
||||
(t!=PT_SPRK || (rt!=PT_RBDM && rt!=PT_LRBD && rt!=PT_INSL)) &&
|
||||
(t!=PT_PHOT || rt!=PT_INSL) &&
|
||||
(rt!=PT_SPNG || parts[r>>8].life==0) &&
|
||||
(rt!=PT_H2 || (parts[r>>8].temp < 2273.15 && sim->pv[y/CELL][x/CELL] < 50.0f)) &&
|
||||
sim->elements[rt].Flammable && (sim->elements[rt].Flammable + (int)(sim->pv[(y+ry)/CELL][(x+rx)/CELL]*10.0f))>(rand()%1000))
|
||||
{
|
||||
sim->part_change_type(r>>8,x+rx,y+ry,PT_FIRE);
|
||||
|
@ -42,13 +42,20 @@ Element_INVIS::Element_INVIS()
|
||||
HighTemperature = ITH;
|
||||
HighTemperatureTransition = NT;
|
||||
|
||||
Update = NULL;
|
||||
Update = &Element_INVIS::update;
|
||||
Graphics = &Element_INVIS::graphics;
|
||||
}
|
||||
|
||||
//#TPT-Directive ElementHeader Element_INVIS static int update(UPDATE_FUNC_ARGS)
|
||||
int Element_INVIS::update(UPDATE_FUNC_ARGS)
|
||||
{
|
||||
if (sim->pv[y/CELL][x/CELL]>4.0f || sim->pv[y/CELL][x/CELL]<-4.0f)
|
||||
parts[i].tmp = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//#TPT-Directive ElementHeader Element_INVIS static int graphics(GRAPHICS_FUNC_ARGS)
|
||||
int Element_INVIS::graphics(GRAPHICS_FUNC_ARGS)
|
||||
|
||||
{
|
||||
//pv[ny/CELL][nx/CELL]>4.0f || pv[ny/CELL][nx/CELL]<-4.0f
|
||||
if(cpart->tmp)
|
||||
|
Reference in New Issue
Block a user