summaryrefslogtreecommitdiff
path: root/src/elements/aray.c
diff options
context:
space:
mode:
authorjacksonmj <jacksonmj@jacksonmj.none>2011-01-11 14:22:24 (GMT)
committer jacksonmj <jacksonmj@jacksonmj.none>2011-01-11 21:17:02 (GMT)
commitdaa6af0cc25076d9484d1e1a776853943231f5a7 (patch)
treea187b78d11aba690c59cd27322fa57ceaa1876ba /src/elements/aray.c
parent4006bdf4c22564e916092d6d63ae63d1fa6bc5b5 (diff)
downloadpowder-daa6af0cc25076d9484d1e1a776853943231f5a7.zip
powder-daa6af0cc25076d9484d1e1a776853943231f5a7.tar.gz
Small fixes and cleanup
Diffstat (limited to 'src/elements/aray.c')
-rw-r--r--src/elements/aray.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/aray.c b/src/elements/aray.c
index a931b1a..55d6b28 100644
--- a/src/elements/aray.c
+++ b/src/elements/aray.c
@@ -55,10 +55,10 @@ int update_ARAY(UPDATE_FUNC_ARGS) {
}
}
} else if (destroy) {
- if (parts[r>>8].type==PT_BRAY) {
+ if ((r&0xFF)==PT_BRAY) {
parts[r>>8].life = 1;
docontinue = 1;
- } else if (parts[r>>8].type==PT_INWR || parts[r>>8].type==PT_ARAY || parts[r>>8].type==PT_WIFI || parts[r>>8].type==PT_FILT || (parts[r>>8].type==PT_SWCH && parts[r>>8].life>=10)) {
+ } else if ((r&0xFF)==PT_INWR || (r&0xFF)==PT_ARAY || (r&0xFF)==PT_WIFI || (r&0xFF)==PT_FILT || ((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) {
docontinue = 1;
} else {
docontinue = 0;