- noch ein bug, ein != statt einem ==
This commit is contained in:
Enno Rehling 2004-05-25 09:30:39 +00:00
parent b1fa0e3dd5
commit ec0fa86e26
2 changed files with 11 additions and 2 deletions

View File

@ -94,8 +94,10 @@ region *
r_standard_to_astral(const region *r) r_standard_to_astral(const region *r)
{ {
region *r2; region *r2;
r2 = tpregion(r);
assert(rplane(r) == get_normalplane());
r2 = tpregion(r);
if (rplane(r2) != get_astralplane() || rterrain(r2) != T_ASTRAL) return NULL; if (rplane(r2) != get_astralplane() || rterrain(r2) != T_ASTRAL) return NULL;
return r2; return r2;
@ -112,7 +114,7 @@ r_astral_to_standard(const region *r)
y = (r->y-TE_CENTER_Y)*TP_RADIUS; y = (r->y-TE_CENTER_Y)*TP_RADIUS;
r2 = findregion(x,y); r2 = findregion(x,y);
if (r2!=NULL || getplaneid(r2) != 0) return NULL; if (rplane(r2)!=get_normalplane()) return NULL;
return r2; return r2;
} }
@ -162,6 +164,12 @@ random_in_teleport_plane(void)
} }
} }
plane *
get_normalplane(void)
{
return NULL;
}
plane * plane *
get_astralplane(void) get_astralplane(void)
{ {

View File

@ -24,6 +24,7 @@ extern "C" {
extern struct region_list *all_in_range(const struct region *r, int n, boolean (*valid)(const struct region *)); extern struct region_list *all_in_range(const struct region *r, int n, boolean (*valid)(const struct region *));
extern boolean inhabitable(const struct region * r); extern boolean inhabitable(const struct region * r);
extern struct plane * get_astralplane(void); extern struct plane * get_astralplane(void);
extern struct plane * get_normalplane(void);
void create_teleport_plane(void); void create_teleport_plane(void);
void set_teleport_plane_regiontypes(void); void set_teleport_plane_regiontypes(void);