From d2265a7c3d819ed67607248deb30f34a9661c96e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 25 May 2004 09:33:44 +0000 Subject: [PATCH] http://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000023 - und einmal einen offset vergessen... --- src/common/kernel/teleport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/kernel/teleport.c b/src/common/kernel/teleport.c index 6d46df235..5e5c35e1b 100644 --- a/src/common/kernel/teleport.c +++ b/src/common/kernel/teleport.c @@ -71,10 +71,10 @@ astralregions(const region * r, boolean (*valid)(const region *)) r = r_astral_to_standard(r); if (r==NULL) return NULL; - for (x=r->x-TP_RADIUS;x<=r->x+TP_RADIUS;++x) { - for (y=r->y-TP_RADIUS;y<=r->y+TP_RADIUS;++y) { + for (x=-TP_RADIUS;x<=+TP_RADIUS;++x) { + for (y=-TP_RADIUS;y<=+TP_RADIUS;++y) { region * rn; - int dist = koor_distance(r->x, r->y, x, y); + int dist = koor_distance(0, 0, x, y); if (dist > TP_RADIUS) continue; if (dist==4) { @@ -83,7 +83,7 @@ astralregions(const region * r, boolean (*valid)(const region *)) if (x==-2 && y==2) continue; if (x==0 && y==-2) continue; } - rn = findregion(x, y); + rn = findregion(r->x+x, r->y+y); if (rn!=NULL && (valid==NULL || valid(rn))) add_regionlist(&rlist, rn); } }