summaryrefslogtreecommitdiff
path: root/src/elements/qrtz.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-08-24 15:35:52 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-27 10:37:03 (GMT)
commit42cfb74c2bb82eb185962a17f848e47265a16316 (patch)
treed2185ba1276dd85144b7d26099f597833f0cc975 /src/elements/qrtz.c
parentf97e8e5c7caddadadf71f7635070777c6e1248ad (diff)
downloadpowder-42cfb74c2bb82eb185962a17f848e47265a16316.zip
powder-42cfb74c2bb82eb185962a17f848e47265a16316.tar.gz
Remove blocking walls from pmap
2.5% speed increase on a screen full of water
Diffstat (limited to 'src/elements/qrtz.c')
-rw-r--r--src/elements/qrtz.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/elements/qrtz.c b/src/elements/qrtz.c
index cf22925..c8017b0 100644
--- a/src/elements/qrtz.c
+++ b/src/elements/qrtz.c
@@ -19,7 +19,7 @@ int update_QRTZ(UPDATE_FUNC_ARGS) {
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
- if ((r>>8)>=NPART || !r)
+ if (!r)
continue;
else if ((r&0xFF)==PT_SLTW && (1>rand()%2500))
{
@@ -37,7 +37,7 @@ int update_QRTZ(UPDATE_FUNC_ARGS) {
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
- if ((r>>8)<NPART && !r && parts[i].ctype!=0)
+ if (!r && parts[i].ctype!=0)
{
np = create_part(-1,x+rx,y+ry,PT_QRTZ);
if (np>-1)
@@ -69,7 +69,7 @@ int update_QRTZ(UPDATE_FUNC_ARGS) {
if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry))
{
r = pmap[y+ry][x+rx];
- if ((r>>8)>=NPART || !r)
+ if (!r)
continue;
if ((r&0xFF)==t && (parts[i].ctype>parts[r>>8].ctype) && parts[r>>8].ctype>=0 )//diffusion
{