From 8f26d5a725eff2ed8218b6bafc99ce0b0b589541 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 4 Jan 2005 00:12:23 +0000 Subject: [PATCH] - Verschieben von Regionen sicherer gemacht - Fehlende includes aus eressea.xml entfernt. --- src/eressea/lua/region.cpp | 6 +++++- src/res/eressea.xml | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/eressea/lua/region.cpp b/src/eressea/lua/region.cpp index 9bcbd639c..65155e65a 100644 --- a/src/eressea/lua/region.cpp +++ b/src/eressea/lua/region.cpp @@ -197,6 +197,10 @@ region_remove(region& r) void region_move(region& r, int x, int y) { + if (findregion(x,y)) { + log_error(("Bei %d, %d gibt es schon eine Region.\n", x, y)); + return; + } #ifdef FAST_CONNECT direction_t dir; for (dir=0;dir!=MAXDIRECTIONS;++dir) { @@ -207,7 +211,7 @@ region_move(region& r, int x, int y) } rn = findregion(x+delta_x[dir], y+delta_y[dir]); if (rn!=NULL) { - direction_t reldir = reldirection(rn, &r); + direction_t reldir = (dir + 3) % MAXDIRECTIONS; rn->connect[reldir] = &r; } r.connect[dir] = rn; diff --git a/src/res/eressea.xml b/src/res/eressea.xml index 11ceb64e1..46b25d73f 100644 --- a/src/res/eressea.xml +++ b/src/res/eressea.xml @@ -11,10 +11,6 @@ - - - -