summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2011-08-26 14:19:43 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2011-08-26 14:19:43 (GMT)
commit4340b84499048cd45a5fd450a922965e878b1d59 (patch)
tree5be87c0abca599f90a3264424e2f606dacae9142 /src
parent10f0c6665f81de9634703397b829d2c675910800 (diff)
downloadpowder-4340b84499048cd45a5fd450a922965e878b1d59.zip
powder-4340b84499048cd45a5fd450a922965e878b1d59.tar.gz
Fixed some possible coding errors
Diffstat (limited to 'src')
-rw-r--r--src/powder.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/powder.c b/src/powder.c
index 8727078..870e793 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -2648,11 +2648,12 @@ int create_parts(int x, int y, int rx, int ry, int c, int flags)
}
if (dw==1)
{
+ ry = ry/CELL;
rx = rx/CELL;
x = x/CELL;
y = y/CELL;
x -= rx/2;
- y -= rx/2;
+ y -= ry/2;
for (ox=x; ox<=x+rx; ox++)
{
for (oy=y; oy<=y+rx; oy++)
@@ -2679,7 +2680,7 @@ int create_parts(int x, int y, int rx, int ry, int c, int flags)
if (b==WL_STREAM)
{
i = x + rx/2;
- j = y + rx/2;
+ j = y + ry/2;
for (v=-1; v<2; v++)
for (u=-1; u<2; u++)
if (i+u>=0 && i+u<XRES/CELL &&