From f9e95a266ecfcbd696380e6a4a69a26c49e077e3 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 25 May 2004 17:54:47 +0000 Subject: [PATCH] =?UTF-8?q?Erstmal=20alle=20Astralraum-=C3=A4nderungen=20w?= =?UTF-8?q?ieder=20r=C3=BCckg=C3=A4ngig=20gemacht=20(aber=20leicht=20zu=20?= =?UTF-8?q?=C3=A4ndern).=20N=C3=A4chste=20Woche=20die=20Schemen=20verklein?= =?UTF-8?q?ern.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Jamrules | 4 ++-- src/common/kernel/teleport.c | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/Jamrules b/src/Jamrules index 19de8cc67..a28dc3034 100644 --- a/src/Jamrules +++ b/src/Jamrules @@ -76,8 +76,8 @@ rule TargetDirectory SubDirC++Flags -g ; } else { - SubDirCcFlags -DNDEBUG ; - SubDirC++Flags -DNDEBUG ; + SubDirCcFlags -DNDEBUG -O2 ; + SubDirC++Flags -DNDEBUG -O2 ; } } diff --git a/src/common/kernel/teleport.c b/src/common/kernel/teleport.c index 5e5c35e1b..2a4d7af94 100644 --- a/src/common/kernel/teleport.c +++ b/src/common/kernel/teleport.c @@ -41,6 +41,7 @@ #define TE_CENTER_X 1000 #define TE_CENTER_Y 1000 #define TP_RADIUS 4 +#define TP_DISTANCE 4 static int real2tp(int rk) { @@ -49,7 +50,7 @@ real2tp(int rk) { * +4 / 5 = 0; * !!!!!!!!!!; */ - return (rk + (TP_RADIUS*5000)) / TP_RADIUS - 5000; + return (rk + (TP_DISTANCE*5000)) / TP_DISTANCE - 5000; } static region * @@ -77,12 +78,6 @@ astralregions(const region * r, boolean (*valid)(const region *)) int dist = koor_distance(0, 0, x, y); if (dist > TP_RADIUS) continue; - if (dist==4) { - /* these three regions are in dispute with the NW, W & SW areas */ - if (x==-2 && y==0) continue; - if (x==-2 && y==2) continue; - if (x==0 && y==-2) continue; - } rn = findregion(r->x+x, r->y+y); if (rn!=NULL && (valid==NULL || valid(rn))) add_regionlist(&rlist, rn); } @@ -95,7 +90,7 @@ r_standard_to_astral(const region *r) { region *r2; - assert(rplane(r) == get_normalplane()); + if (rplane(r) != get_normalplane()) return NULL; r2 = tpregion(r); if (rplane(r2) != get_astralplane() || rterrain(r2) != T_ASTRAL) return NULL; @@ -110,8 +105,8 @@ r_astral_to_standard(const region *r) region *r2; assert(rplane(r) == get_astralplane()); - x = (r->x-TE_CENTER_X)*TP_RADIUS; - y = (r->y-TE_CENTER_Y)*TP_RADIUS; + x = (r->x-TE_CENTER_X)*TP_DISTANCE; + y = (r->y-TE_CENTER_Y)*TP_DISTANCE; r2 = findregion(x,y); if (rplane(r2)!=get_normalplane()) return NULL;