diff options
Diffstat (limited to 'src/elements/aray.c')
| -rw-r--r-- | src/elements/aray.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/elements/aray.c b/src/elements/aray.c index f323444..ac51f66 100644 --- a/src/elements/aray.c +++ b/src/elements/aray.c @@ -23,27 +23,28 @@ int update_ARAY(UPDATE_FUNC_ARGS) { if (!r) { int nr = create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_BRAY); if (nr!=-1) { - if (destroy) { + if (destroy) {//if it came from PSCN parts[nr].tmp = 2; parts[nr].life = 2; } else parts[nr].ctype = colored; } } else if (!destroy) { - if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==0) { + 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; + parts[r>>8].life = 1020;//makes it last a while parts[r>>8].tmp = 1; - if (!parts[r>>8].ctype) + if (!parts[r>>8].ctype)//and colors it if it isn't already parts[r>>8].ctype = colored; } - docontinue = 0; - } else if ((r&0xFF)==PT_BRAY&&parts[r>>8].tmp==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) { + 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 } else if ((r&0xFF)!=PT_INWR && (r&0xFF)!=PT_ARAY && (r&0xFF)!=PT_WIFI && !((r&0xFF)==PT_SWCH && parts[r>>8].life>=10)) { if (nyy!=0 || nxx!=0) { create_part(-1, x+nxi+nxx, y+nyi+nyy, PT_SPRK); @@ -58,6 +59,7 @@ int update_ARAY(UPDATE_FUNC_ARGS) { if ((r&0xFF)==PT_BRAY) { parts[r>>8].life = 1; docontinue = 1; + //this if prevents red BRAY from stopping on certain materials } 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 { |
