forked from github/server
Fixed a bug that crasehed the server
when Stonegolems created a new building and the whole unite was consumed during this process (could not enter the new building as no one was left in the unit)
This commit is contained in:
parent
a75d91fb6d
commit
84fb776d1c
1 changed files with 2 additions and 1 deletions
|
@ -774,7 +774,8 @@ build_building(unit * u, const building_type * btype, int want, order * ord)
|
|||
fset(b, BLD_MAINTAINED);
|
||||
|
||||
/* Die Einheit befindet sich automatisch im Inneren der neuen Burg. */
|
||||
if (leave(u, false)) {
|
||||
/* Check if unit still have member, as stonegolems are destroyed during construction*/
|
||||
if (leave(u, false) && u->number >> 0) {
|
||||
u_set_building(u, b);
|
||||
assert(building_owner(b)==u);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue