fix -nan RFRG glitch
This commit is contained in:
parent
541417008e
commit
2b3fbbd50e
@ -49,6 +49,11 @@ int Element_RFRG::update(UPDATE_FUNC_ARGS)
|
||||
{
|
||||
float new_pressure = sim->pv[y/CELL][x/CELL];
|
||||
float *old_pressure = (float *)&parts[i].tmp;
|
||||
if (std::isnan(*old_pressure))
|
||||
{
|
||||
*old_pressure = new_pressure;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// * 0 bar seems to be pressure value -256 in TPT, see Air.cpp. Also, 1 bar seems to be pressure value 0.
|
||||
// With those two values we can set up our pressure scale which states that ... the highest pressure
|
||||
|
Reference in New Issue
Block a user