INWR should cool after being sparked; and correct function parameters
Also correct grule size and replicate existing freezing point behaviour for lava with strange ctypes.
This commit is contained in:
parent
a5ff51f5a5
commit
fe033ce859
@ -687,7 +687,7 @@ static part_transition ptransitions[PT_NUM] =
|
|||||||
#undef ST
|
#undef ST
|
||||||
|
|
||||||
|
|
||||||
static int grule[NGOL][9] =
|
static int grule[NGOL][10] =
|
||||||
{
|
{
|
||||||
// 0,1,2,3,4,5,6,7,8,STATES live=1 spawn=2 spawn&live=3 States are kind of how long until it dies, normal ones use two states(living,dead) for others the intermediate states live but do nothing
|
// 0,1,2,3,4,5,6,7,8,STATES live=1 spawn=2 spawn&live=3 States are kind of how long until it dies, normal ones use two states(living,dead) for others the intermediate states live but do nothing
|
||||||
{0,0,0,0,0,0,0,0,0,2},//blank
|
{0,0,0,0,0,0,0,0,0,2},//blank
|
||||||
@ -804,7 +804,7 @@ static void create_gain_photon(int pp);
|
|||||||
void kill_part(int i);
|
void kill_part(int i);
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__)
|
#if defined(WIN32) && !defined(__GNUC__)
|
||||||
extern _inline void part_change_type(int n, int x, int y, int t);
|
extern _inline void part_change_type(int i, int x, int y, int t);
|
||||||
#else
|
#else
|
||||||
extern inline void part_change_type(int i, int x, int y, int t);
|
extern inline void part_change_type(int i, int x, int y, int t);
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,7 +5,7 @@ int update_SPRK(UPDATE_FUNC_ARGS) {
|
|||||||
int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype;
|
int r, rx, ry, rt, conduct_sprk, nearp, pavg, ct = parts[i].ctype;
|
||||||
if (parts[i].life<=0)
|
if (parts[i].life<=0)
|
||||||
{
|
{
|
||||||
if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD)
|
if (ct==PT_WATR||ct==PT_SLTW||ct==PT_PSCN||ct==PT_NSCN||ct==PT_ETRD||ct==PT_INWR)
|
||||||
parts[i].temp = R_TEMP + 273.15f;
|
parts[i].temp = R_TEMP + 273.15f;
|
||||||
if (!ct)
|
if (!ct)
|
||||||
ct = PT_METL;
|
ct = PT_METL;
|
||||||
|
@ -450,7 +450,7 @@ void kill_part(int i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__)
|
#if defined(WIN32) && !defined(__GNUC__)
|
||||||
_inline void part_change_type(int n, int x, int y, int t)
|
_inline void part_change_type(int i, int x, int y, int t)
|
||||||
#else
|
#else
|
||||||
inline void part_change_type(int i, int x, int y, int t)
|
inline void part_change_type(int i, int x, int y, int t)
|
||||||
#endif
|
#endif
|
||||||
@ -465,7 +465,7 @@ inline void part_change_type(int i, int x, int y, int t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__GNUC__)
|
#if defined(WIN32) && !defined(__GNUC__)
|
||||||
_inline int create_n_parts(int n, int x, int y, int t)
|
_inline int create_n_parts(int n, int x, int y, float vx, float vy, int t)
|
||||||
#else
|
#else
|
||||||
inline int create_n_parts(int n, int x, int y, float vx, float vy, int t)
|
inline int create_n_parts(int n, int x, int y, float vx, float vy, int t)
|
||||||
#endif
|
#endif
|
||||||
@ -1124,7 +1124,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp;
|
float mv, dx, dy, ix, iy, lx, ly, nrx, nry, dp;
|
||||||
int fin_x, fin_y, clear_x, clear_y;
|
int fin_x, fin_y, clear_x, clear_y;
|
||||||
float fin_xf, fin_yf, clear_xf, clear_yf;
|
float fin_xf, fin_yf, clear_xf, clear_yf;
|
||||||
float nn, ct1, ct2;
|
float nn, ct1, ct2, swappage;
|
||||||
float pt = R_TEMP;
|
float pt = R_TEMP;
|
||||||
float c_heat = 0.0f;
|
float c_heat = 0.0f;
|
||||||
int h_count = 0;
|
int h_count = 0;
|
||||||
@ -1467,7 +1467,6 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
if (!legacy_enable)
|
if (!legacy_enable)
|
||||||
{
|
{
|
||||||
if (y-2 >= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID)) {
|
if (y-2 >= 0 && y-2 < YRES && (ptypes[t].properties&TYPE_LIQUID)) {
|
||||||
float swappage;
|
|
||||||
r = pmap[y-2][x];
|
r = pmap[y-2][x];
|
||||||
if (!((r>>8)>=NPART || !r || parts[i].type != (r&0xFF))) {
|
if (!((r>>8)>=NPART || !r || parts[i].type != (r&0xFF))) {
|
||||||
if (parts[i].temp>parts[r>>8].temp) {
|
if (parts[i].temp>parts[r>>8].temp) {
|
||||||
@ -1539,6 +1538,7 @@ void update_particles_i(pixel *vid, int start, int inc)
|
|||||||
if (parts[i].ctype&&parts[i].ctype!=PT_LAVA) {
|
if (parts[i].ctype&&parts[i].ctype!=PT_LAVA) {
|
||||||
if (ptransitions[parts[i].ctype].tht==PT_LAVA&&pt>=ptransitions[parts[i].ctype].thv) s = 0;
|
if (ptransitions[parts[i].ctype].tht==PT_LAVA&&pt>=ptransitions[parts[i].ctype].thv) s = 0;
|
||||||
else if (parts[i].ctype==PT_THRM&&pt>=ptransitions[PT_BMTL].thv) s = 0;
|
else if (parts[i].ctype==PT_THRM&&pt>=ptransitions[PT_BMTL].thv) s = 0;
|
||||||
|
else if (pt>=973.0f) s = 0; // freezing point for lava with any other (not listed in ptransitions as turning into lava) ctype
|
||||||
else {
|
else {
|
||||||
t = parts[i].ctype;
|
t = parts[i].ctype;
|
||||||
parts[i].ctype = PT_NONE;
|
parts[i].ctype = PT_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user