From 58620a95290e42455585b8265efe310b17514ed4 Mon Sep 17 00:00:00 2001 From: Savely Skresanov Date: Wed, 30 May 2012 17:23:53 +0700 Subject: [PATCH] Fixed the bug with snow, where it melted without taking it's ctype into account. --- src/elementdata.c | 2 +- src/powder.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/elementdata.c b/src/elementdata.c index 797da7536..2f7af2561 100644 --- a/src/elementdata.c +++ b/src/elementdata.c @@ -223,7 +223,7 @@ part_transition ptransitions[PT_NUM] = /* ICE */ {IPL, NT, 0.8f, PT_SNOW, ITL, NT, 233.0f, ST}, /* METL */ {IPL, NT, IPH, NT, ITL, NT, 1273.0f,PT_LAVA}, /* SPRK */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /* SNOW */ {IPL, NT, IPH, NT, ITL, NT, 273.0f, PT_WATR}, + /* SNOW */ {IPL, NT, IPH, NT, ITL, NT, 273.0f, ST}, /* WOOD */ {IPL, NT, IPH, NT, ITL, NT, 873.0f, PT_FIRE}, /* NEUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /* PLUT */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, diff --git a/src/powder.c b/src/powder.c index 83a180a58..7f797d0dd 100644 --- a/src/powder.c +++ b/src/powder.c @@ -2000,7 +2000,7 @@ void update_particles_i(pixel *vid, int start, int inc) s = 1; //A fix for ice with ctype = 0 - if (t==PT_ICEI && (parts[i].ctype==0 || parts[i].ctype>=PT_NUM || parts[i].ctype==PT_ICEI)) + if ((t==PT_ICEI || t==PT_SNOW) && (parts[i].ctype==0 || parts[i].ctype>=PT_NUM || parts[i].ctype==PT_ICEI || parts[i].ctype==PT_SNOW)) parts[i].ctype = PT_WATR; if (ctemph>ptransitions[t].thv&&ptransitions[t].tht>-1) { @@ -2024,9 +2024,9 @@ void update_particles_i(pixel *vid, int start, int inc) if (ptransitions[t].tht!=PT_NUM) t = ptransitions[t].tht; #endif - else if (t==PT_ICEI) { - if (parts[i].ctype