summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2012-12-18 19:55:10 (GMT)
committer jacob1 <jfu614@gmail.com>2012-12-18 19:55:10 (GMT)
commitb236c75209c45bddf51f6911593d27779dd621e2 (patch)
treeeb73becb499ecbedad620669840b357a8583e154 /src/simulation/Simulation.cpp
parent771d71ea4619f30bd1b135697e83037ba333008f (diff)
downloadpowder-b236c75209c45bddf51f6911593d27779dd621e2.zip
powder-b236c75209c45bddf51f6911593d27779dd621e2.tar.gz
make TSNS not detect METL, some other sensor and CONV fixes
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp
index 1ac5d48..1e5fbb9 100644
--- a/src/simulation/Simulation.cpp
+++ b/src/simulation/Simulation.cpp
@@ -2801,24 +2801,22 @@ int Simulation::create_part(int p, int x, int y, int tv)
{
if (pmap[y][x])
{
+ int drawOn = pmap[y][x]&0xFF;
if ((
- ((pmap[y][x]&0xFF)==PT_STOR&&!(elements[t].Properties&TYPE_SOLID))||
- (pmap[y][x]&0xFF)==PT_CLNE||
- (pmap[y][x]&0xFF)==PT_BCLN||
- (pmap[y][x]&0xFF)==PT_CONV||
- ((pmap[y][x]&0xFF)==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN)||
- ((pmap[y][x]&0xFF)==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN)
+ (drawOn == PT_STOR && !(elements[t].Properties&TYPE_SOLID)) ||
+ drawOn==PT_CLNE ||
+ drawOn==PT_BCLN ||
+ drawOn==PT_CONV ||
+ (drawOn==PT_PCLN&&t!=PT_PSCN&&t!=PT_NSCN) ||
+ (drawOn==PT_PBCN&&t!=PT_PSCN&&t!=PT_NSCN)
)&&(
- t!=PT_CLNE&&t!=PT_PCLN&&
- t!=PT_BCLN&&t!=PT_STKM&&
- t!=PT_STKM2&&t!=PT_PBCN&&
- t!=PT_STOR&&t!=PT_FIGH)
+ t != PT_CLNE && t != PT_PCLN && t != PT_BCLN && t != PT_STKM && t != PT_STKM2 && t != PT_PBCN && t != PT_STOR && t != PT_FIGH && t != PT_CONV)
)
{
parts[pmap[y][x]>>8].ctype = t;
- if (t==PT_LIFE && v<NGOLALT && (pmap[y][x]&0xFF)!=PT_STOR) parts[pmap[y][x]>>8].tmp = v;
+ if (t == PT_LIFE && v < NGOLALT && drawOn != PT_STOR) parts[pmap[y][x]>>8].tmp = v;
}
- else if ((pmap[y][x]&0xFF) == PT_DTEC && (pmap[y][x]&0xFF) != t)
+ else if (drawOn == PT_DTEC && drawOn != t)
{
parts[pmap[y][x]>>8].ctype = t;
if (t==PT_LIFE && v<NGOLALT)