summaryrefslogtreecommitdiff
path: root/src/elements/phot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/phot.c')
-rw-r--r--src/elements/phot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/phot.c b/src/elements/phot.c
index 59e9cd8..a6a5d07 100644
--- a/src/elements/phot.c
+++ b/src/elements/phot.c
@@ -6,8 +6,8 @@ int update_PHOT(UPDATE_FUNC_ARGS) {
if (1>rand()%10) update_PYRO(UPDATE_FUNC_SUBCALL_ARGS);
for (rx=-1; rx<2; rx++)
for (ry=-1; ry<2; ry++)
- if (x+rx>=0 && y+ry>0 && x+rx<XRES && y+ry<YRES && (rx || ry)) {
- r = pmap[x+rx][y+ry];
+ 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)
continue;
if ((r&0xFF)==PT_ISOZ && 5>(rand()%2000))