summaryrefslogtreecommitdiff
path: root/src/elements/emp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/emp.c')
-rw-r--r--src/elements/emp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/emp.c b/src/elements/emp.c
index a4c6067..c47c902 100644
--- a/src/elements/emp.c
+++ b/src/elements/emp.c
@@ -1,7 +1,7 @@
#include <element.h>
int update_EMP(UPDATE_FUNC_ARGS) {
- int r,rx,ry,ok=0,t;
+ int r,rx,ry,ok=0,t,n,nx,ny;
if (parts[i].life)
return 0;
for (rx=-2; rx<3; rx++)
@@ -42,7 +42,7 @@ int update_EMP(UPDATE_FUNC_ARGS) {
else if (rand()%120==0)
part_change_type(r, rx, ry, PT_NTCT);
}
- int n,nx,ny;
+
for (nx=-2; nx<3; nx++)
for (ny=-2; ny<3; ny++)
if (rx+nx>=0 && ry+ny>=0 && rx+nx<XRES && ry+ny<YRES && (rx || ry))