From fc4de9640cedaaf73e3f43610492be8d92313929 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Sat, 21 May 2011 18:25:19 +0800 Subject: [PATCH] Fix sim options description, GOO and DEUT --- includes/powder.h | 2 +- src/elements/neut.c | 10 +++++----- src/main.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/powder.h b/includes/powder.h index 31d1152b2..a1569bde3 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -399,7 +399,7 @@ static const part_type ptypes[PT_NUM] = {"CLNE", PIXPACK(0xFFD010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 100, SC_SPECIAL, R_TEMP+0.0f +273.15f, 251, "Solid. Duplicates any particles it touches.", ST_SOLID, TYPE_SOLID, &update_CLNE}, {"GAS", PIXPACK(0xE0FF20), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 600, 0, 0, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Gas. Diffuses. Flammable. Liquefies under pressure.", ST_GAS, TYPE_GAS, NULL}, {"C-4", PIXPACK(0xD080E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 1000, 2, 50, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Solid. Pressure sensitive explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, NULL}, - {"GOO", PIXPACK(0x804000), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC, &update_GOO}, + {"GOO", PIXPACK(0x804000), 0.0f, 0.00f * CFDS, 0.97f, 0.50f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 12, 1, 100, SC_SOLIDS, R_TEMP+0.0f +273.15f, 75, "Solid. Deforms and disappears under pressure.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GOO}, {"ICE", PIXPACK(0xA0C0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0003f* CFDS, 0, 0, 0, 0, 20, 1, 100, SC_SOLIDS, R_TEMP-50.0f+273.15f, 46, "Solid. Freezes water. Crushes under pressure. Cools down air.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_ICEI}, {"METL", PIXPACK(0x404060), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Conducts electricity. Meltable.", ST_SOLID, TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL}, {"SPRK", PIXPACK(0xFFFF80), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electricity. Conducted by metal and water.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_SPRK}, diff --git a/src/elements/neut.c b/src/elements/neut.c index 9e778980e..20d46180e 100644 --- a/src/elements/neut.c +++ b/src/elements/neut.c @@ -2,9 +2,9 @@ #if defined(WIN32) && !defined(__GNUC__) -_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, float temp, int t) #else -inline int create_n_parts(int n, int x, int y, float vx, float vy, int t)//testing a new deut create part +inline int create_n_parts(int n, int x, int y, float vx, float vy, float temp, int t)//testing a new deut create part #endif { int i, c; @@ -33,7 +33,7 @@ inline int create_n_parts(int n, int x, int y, float vx, float vy, int t)//testi parts[i].vx = r*cosf(a); parts[i].vy = r*sinf(a); parts[i].ctype = 0; - parts[i].temp += (n*170); + parts[i].temp = temp; parts[i].tmp = 0; if (t!=PT_STKM&&t!=PT_STKM2 && t!=PT_PHOT && t!=PT_NEUT && !pmap[y][x]) pmap[y][x] = t|(i<<8); @@ -81,9 +81,9 @@ int update_NEUT(UPDATE_FUNC_ARGS) { update_PYRO(UPDATE_FUNC_SUBCALL_ARGS); } #ifdef SDEUT - else if ((r&0xFF)==PT_DEUT && (pressureFactor+1+(parts[i].life/100))>(rand()%1000)) + else if ((r&0xFF)==PT_DEUT && (pressureFactor+1+(parts[r>>8].life/100))>(rand()%1000)) { - create_n_parts(parts[r>>8].life, x+rx, y+ry, parts[i].vx, parts[i].vy, PT_NEUT); + create_n_parts(parts[r>>8].life, x+rx, y+ry, parts[i].vx, parts[i].vy, restrict_flt(parts[r>>8].temp + parts[r>>8].life*500, MIN_TEMP, MAX_TEMP), PT_NEUT); kill_part(r>>8); } #else diff --git a/src/main.c b/src/main.c index 7317f4561..fbb7ababe 100644 --- a/src/main.c +++ b/src/main.c @@ -2993,7 +2993,7 @@ int main(int argc, char *argv[]) drawtext(vid_buf, 16, YRES-24, "Click-and-drag to specify a rectangle to copy (right click = cancel).", 255, 216, 32, da*5); break; case 270: - drawtext(vid_buf, 16, YRES-24, "Enable or disable compatibility mode (disables heat simulation).", 255, 255, 255, da*5); + drawtext(vid_buf, 16, YRES-24, "Simulation options", 255, 255, 255, da*5); break; case 271: drawtext(vid_buf, 16, YRES-24, "You're a moderator", 255, 255, 255, da*5);