- Verschieben von Regionen sicherer gemacht

- Fehlende includes aus eressea.xml entfernt.
This commit is contained in:
Enno Rehling 2005-01-04 00:12:23 +00:00
parent 918057aa90
commit 8f26d5a725
2 changed files with 5 additions and 5 deletions

View File

@ -197,6 +197,10 @@ region_remove(region& r)
void void
region_move(region& r, int x, int y) 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 #ifdef FAST_CONNECT
direction_t dir; direction_t dir;
for (dir=0;dir!=MAXDIRECTIONS;++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]); rn = findregion(x+delta_x[dir], y+delta_y[dir]);
if (rn!=NULL) { if (rn!=NULL) {
direction_t reldir = reldirection(rn, &r); direction_t reldir = (dir + 3) % MAXDIRECTIONS;
rn->connect[reldir] = &r; rn->connect[reldir] = &r;
} }
r.connect[dir] = rn; r.connect[dir] = rn;

View File

@ -11,10 +11,6 @@
<xi:include href="prefixes.xml"/> <xi:include href="prefixes.xml"/>
<xi:include href="ships.xml"/> <xi:include href="ships.xml"/>
<xi:include href="buildings.xml"/> <xi:include href="buildings.xml"/>
<xi:include href="terrains.xml"/>
<xi:include href="alchemy.xml"/>
<xi:include href="technologies.xml"/>
<xi:include href="skills.xml"/>
<xi:include href="equipment.xml"/> <xi:include href="equipment.xml"/>
<game name="Eressea" welcome="eressea"> <game name="Eressea" welcome="eressea">