From dfb03573822761038358e78c22aba74130265ef2 Mon Sep 17 00:00:00 2001 From: Catelite Date: Wed, 6 Jun 2012 12:56:16 -0400 Subject: [PATCH] Changed EXOT to change into touching particles in the five frames at the top of every tmp cycle. Also, changed BREC references into BREL for consistency since it isn't often mentioned. --- includes/powder.h | 2 +- src/elements/brmt.c | 2 +- src/elements/emp.c | 8 ++++---- src/elements/exot.c | 3 +++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/includes/powder.h b/includes/powder.h index fc767dd60..c888e6b91 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -210,7 +210,7 @@ #define PT_QRTZ 132 #define PT_PQRT 133 #define PT_EMP 134 -#define PT_BREC 135 +#define PT_BREL 135 #define PT_ELEC 136 #define PT_ACEL 137 #define PT_DCEL 138 diff --git a/src/elements/brmt.c b/src/elements/brmt.c index 404088ae2..99702a2aa 100644 --- a/src/elements/brmt.c +++ b/src/elements/brmt.c @@ -30,7 +30,7 @@ int update_BRMT(UPDATE_FUNC_ARGS) { tempFactor = 1000 - (((250.0f+273.15f)-parts[i].temp)*2); if(tempFactor < 2) tempFactor = 2; - if ((rt==PT_BREC) && 1 > (rand()%tempFactor)) + if ((rt==PT_BREL) && 1 > (rand()%tempFactor)) { if(rand()%2) { diff --git a/src/elements/emp.c b/src/elements/emp.c index 91fbbeb9a..7b3dbba71 100644 --- a/src/elements/emp.c +++ b/src/elements/emp.c @@ -53,7 +53,7 @@ int update_EMP(UPDATE_FUNC_ARGS) { if (ptypes[parts[r].type].hconduct && rand()%100==0) parts[r].temp = restrict_flt(parts[r].temp+3000.0f, MIN_TEMP, MAX_TEMP); if (rand()%80==0) - part_change_type(r, rx, ry, PT_BREC); + part_change_type(r, rx, ry, PT_BREL); else if (rand()%120==0) part_change_type(r, rx, ry, PT_NTCT); } @@ -96,13 +96,13 @@ int update_EMP(UPDATE_FUNC_ARGS) { } if ((n&0xFF)==PT_WIFI && rand()%16==0) { - create_part(n>>8, rx+nx, ry+ny, PT_BREC); + create_part(n>>8, rx+nx, ry+ny, PT_BREL); parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); } } if ((n&0xFF)==PT_SWCH && rand()%100==0) { - part_change_type(n>>8, rx+nx, ry+ny, PT_BREC); + part_change_type(n>>8, rx+nx, ry+ny, PT_BREL); } if ((n&0xFF)==PT_SWCH && rand()%100==0) { @@ -110,7 +110,7 @@ int update_EMP(UPDATE_FUNC_ARGS) { } if ((n&0xFF)==PT_ARAY && rand()%60==0) { - create_part(n>>8, rx+nx, ry+ny, PT_BREC); + create_part(n>>8, rx+nx, ry+ny, PT_BREL); parts[n>>8].temp = restrict_flt(parts[n>>8].temp+1000.0f, MIN_TEMP, MAX_TEMP); } if (t==PT_DLAY && rand()%70==0) diff --git a/src/elements/exot.c b/src/elements/exot.c index 7c851bde5..c26129b49 100644 --- a/src/elements/exot.c +++ b/src/elements/exot.c @@ -32,6 +32,9 @@ int update_EXOT(UPDATE_FUNC_ARGS) { parts[i].tmp2 += 100; } } + if (parts[i].tmp>245) + if ((r&0xFF)!=PT_EXOT && (r&0xFF)!=PT_BREL && (r&0xFF)!=PT_DMND && (r&0xFF)!=PT_CLNE && (r&0xFF)!=PT_PRTI && (r&0xFF)!=PT_PRTO && (r&0xFF)!=PT_PCLN && (r&0xFF)!=PT_PHOT && (r&0xFF)!=PT_VOID && (r&0xFF)!=PT_NBHL) + create_part(i, x, y, parts[r>>8].type); } parts[i].tmp--; parts[i].tmp2--;