summaryrefslogtreecommitdiff
path: root/src/simulation/elements/ARAY.cpp
diff options
context:
space:
mode:
authorcracker64 <cracker642@gmail.com>2013-02-28 17:37:16 (GMT)
committer cracker64 <cracker642@gmail.com>2013-02-28 17:37:16 (GMT)
commit5873d6958641af21b92fcb039d26c336331f19e7 (patch)
treea334e74d7cf79726f5c0a411515bed801ee0333f /src/simulation/elements/ARAY.cpp
parentc65081d3ed44a97cea0f41a63e9ec07cf0feb5f2 (diff)
downloadpowder-5873d6958641af21b92fcb039d26c336331f19e7.zip
powder-5873d6958641af21b92fcb039d26c336331f19e7.tar.gz
Going through again.
Diffstat (limited to 'src/simulation/elements/ARAY.cpp')
-rw-r--r--src/simulation/elements/ARAY.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp
index e38b7ee..85dfc52 100644
--- a/src/simulation/elements/ARAY.cpp
+++ b/src/simulation/elements/ARAY.cpp
@@ -78,17 +78,20 @@ int Element_ARAY::update(UPDATE_FUNC_ARGS)
parts[nr].temp = parts[i].temp;
}
} else if (!destroy) {
- 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;
+ 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;
}
- 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
@@ -151,4 +154,4 @@ int Element_ARAY::update(UPDATE_FUNC_ARGS)
}
-Element_ARAY::~Element_ARAY() {} \ No newline at end of file
+Element_ARAY::~Element_ARAY() {}