summaryrefslogtreecommitdiff
path: root/src/elements
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-09-29 22:14:36 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-09-29 22:14:36 (GMT)
commit311d3ef6c11c0db37be8d938b984a69dbd85a594 (patch)
tree007bee31edea3e9d5e34d026e7d65bf16a96575a /src/elements
parent3ed24d084efc79cc7e368f078365e8bd2126cd7d (diff)
downloadpowder-311d3ef6c11c0db37be8d938b984a69dbd85a594.zip
powder-311d3ef6c11c0db37be8d938b984a69dbd85a594.tar.gz
Added crappy scattering for qrtz
Diffstat (limited to 'src/elements')
-rw-r--r--src/elements/phot.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/elements/phot.c b/src/elements/phot.c
index 98d421d..b465029 100644
--- a/src/elements/phot.c
+++ b/src/elements/phot.c
@@ -39,6 +39,19 @@ int update_PHOT(UPDATE_FUNC_ARGS) {
pv[y/CELL][x/CELL] -= 15.0f * CFDS;
}
}
+ r = pmap[y][x];
+ if((r&0xFF) == PT_QRTZ && r)
+ {
+ int t1, t2, t3;
+ parts[i].vx += ((float)(rand()%1000-500))/1000.0f;
+ parts[i].vy += ((float)(rand()%1000-500))/1000.0f;
+ t1 = (parts[i].ctype & 0x0000FF)+(rand()%5)-2;
+ t2 = ((parts[i].ctype & 0x00FF00)>>8)+(rand()%5)-2;
+ t3 = ((parts[i].ctype & 0xFF0000)>>16)+(rand()%5)-2;
+ parts[i].ctype = (parts[i].ctype & 0xFF000000) | (t3<<16) | (t2<<8) | t1;
+
+
+ }
//r = pmap[y][x];
//rt = r&0xFF;
/*if (rt==PT_CLNE || rt==PT_PCLN || rt==PT_BCLN || rt==PT_PBCN) {