From c0b45928392efdffbde819842387a041e2d1936a Mon Sep 17 00:00:00 2001 From: jacob1 Date: Wed, 8 May 2013 10:29:10 -0400 Subject: [PATCH] fix PSCN BRAY (tmp = 2) not stopping normal BRAY from going through also some other random things --- src/Config.h | 2 +- src/cat/LuaScriptInterface.cpp | 2 +- src/simulation/elements/ARAY.cpp | 23 ++++++++++------------- src/simulation/elements/BTRY.cpp | 2 +- src/simulation/elements/GOLD.cpp | 2 +- src/simulation/elements/TUGN.cpp | 2 +- 6 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/Config.h b/src/Config.h index d8e43ce4f..dea2a8e5a 100644 --- a/src/Config.h +++ b/src/Config.h @@ -16,7 +16,7 @@ #endif #ifndef MINOR_VERSION -#define MINOR_VERSION 1 +#define MINOR_VERSION 2 #endif #ifndef BUILD_NUM diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index d760ae308..4b2e749e0 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -2135,7 +2135,7 @@ int LuaScriptInterface::Command(std::string command) } else { - int level = lua_gettop(l), ret; + int level = lua_gettop(l), ret = -1; std::string text = ""; lastError = ""; currentCommand = true; diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp index f7d31941b..b1c2b8492 100644 --- a/src/simulation/elements/ARAY.cpp +++ b/src/simulation/elements/ARAY.cpp @@ -78,20 +78,17 @@ int Element_ARAY::update(UPDATE_FUNC_ARGS) parts[nr].temp = parts[i].temp; } } else if (!destroy) { - if ((r&0xFF)==PT_BRAY) { - if (parts[r>>8].tmp==0){//if it hits another BRAY that isn't red - if (nyy!=0 || nxx!=0) { - parts[r>>8].life = 1020;//makes it last a while - parts[r>>8].tmp = 1; - if (!parts[r>>8].ctype)//and colors it if it isn't already - parts[r>>8].ctype = colored; - } - docontinue = 0;//then stop it - } - else if (parts[r>>8].tmp==1) {//if it hits one that already was a long life, reset it - parts[r>>8].life = 1020; - //docontinue = 1; + if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) {//if it hits another BRAY that isn't red + if (nyy!=0 || nxx!=0) { + parts[r>>8].life = 1020;//makes it last a while + parts[r>>8].tmp = 1; + if (!parts[r>>8].ctype)//and colors it if it isn't already + parts[r>>8].ctype = colored; } + docontinue = 0;//then stop it + } else if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==1) {//if it hits one that already was a long life, reset it + parts[r>>8].life = 1020; + //docontinue = 1; } else if ((r&0xFF)==PT_FILT) {//get color if passed through FILT colored = parts[r>>8].ctype; //this if prevents BRAY from stopping on certain materials diff --git a/src/simulation/elements/BTRY.cpp b/src/simulation/elements/BTRY.cpp index f4a5d06f3..00fd42686 100644 --- a/src/simulation/elements/BTRY.cpp +++ b/src/simulation/elements/BTRY.cpp @@ -28,7 +28,7 @@ Element_BTRY::Element_BTRY() Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; - Description = "Solid. Generates infinite electricity."; + Description = "Generates infinite electricity."; State = ST_SOLID; Properties = TYPE_SOLID; diff --git a/src/simulation/elements/GOLD.cpp b/src/simulation/elements/GOLD.cpp index 09ff5cb17..8536acafd 100644 --- a/src/simulation/elements/GOLD.cpp +++ b/src/simulation/elements/GOLD.cpp @@ -29,7 +29,7 @@ Element_GOLD::Element_GOLD() Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; - Description = "Corrosion resistant metal, will reverse corrosion of iron"; + Description = "Corrosion resistant metal, will reverse corrosion of iron."; State = ST_SOLID; Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_HOT_GLOW|PROP_LIFE_DEC|PROP_NEUTPASS; diff --git a/src/simulation/elements/TUGN.cpp b/src/simulation/elements/TUGN.cpp index 9614ae588..4fb803291 100644 --- a/src/simulation/elements/TUGN.cpp +++ b/src/simulation/elements/TUGN.cpp @@ -29,7 +29,7 @@ Element_TUGN::Element_TUGN() Temperature = R_TEMP+0.0f +273.15f; HeatConduct = 251; - Description = "Brittle metal with a very high melting point"; + Description = "Brittle metal with a very high melting point."; State = ST_SOLID; Properties = TYPE_SOLID|PROP_CONDUCTS|PROP_LIFE_DEC;