forked from github/server
"Eisberg treibt ab und angelandetes Boot nimmt Schaden" as mentioned in the bug, regions get their neighbor-relations screwed after icebergs drift. in runhash(), I'm removing the relationships so that they are getting rebuilt properly. Issue: 959
This commit is contained in:
parent
aaf7443d53
commit
88ecdd173a
1 changed files with 448 additions and 435 deletions
|
@ -295,10 +295,23 @@ void
|
|||
runhash(region * r)
|
||||
{
|
||||
region **show;
|
||||
|
||||
#ifdef FAST_CONNECT
|
||||
int d, di;
|
||||
for (d=0,di=MAXDIRECTIONS/2;d!=MAXDIRECTIONS;++d,++di) {
|
||||
region * rc = r->connect[d];
|
||||
if (rc!=NULL) {
|
||||
if (di>=MAXDIRECTIONS) di-=MAXDIRECTIONS;
|
||||
rc->connect[di] = NULL;
|
||||
r->connect[d] = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
for (show = ®ionhash[coor_hashkey(r->x, r->y) % RMAXHASH]; *show; show = &(*show)->nexthash) {
|
||||
if ((*show)->x == r->x && (*show)->y == r->y)
|
||||
if ((*show)->x == r->x && (*show)->y == r->y) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (*show) {
|
||||
assert(*show == r);
|
||||
*show = (*show)->nexthash;
|
||||
|
|
Loading…
Reference in a new issue