forked from github/server
fix for duplicate astral plane
This commit is contained in:
parent
bc5fa11611
commit
43422a0619
1 changed files with 8 additions and 2 deletions
|
@ -1609,8 +1609,14 @@ readgame(const char * filename, int mode, int backup)
|
|||
planes = NULL;
|
||||
n = store->r_int(store);
|
||||
while(--n >= 0) {
|
||||
plane *pl = calloc(1, sizeof(plane));
|
||||
pl->id = store->r_int(store);
|
||||
int id = store->r_int(store);
|
||||
plane *pl = getplanebyid(id);
|
||||
if (pl==NULL) {
|
||||
calloc(1, sizeof(plane));
|
||||
} else {
|
||||
log_warning(("the plane with id=%d already exists.\n", id));
|
||||
}
|
||||
pl->id = id;
|
||||
pl->name = store->r_str(store);
|
||||
pl->minx = (short)store->r_int(store);
|
||||
pl->maxx = (short)store->r_int(store);
|
||||
|
|
Loading…
Reference in a new issue