forked from github/server
ship and building owners encapsulated in accessors
This commit is contained in:
parent
76ba2b9303
commit
3d50745d77
2 changed files with 3 additions and 3 deletions
|
@ -69,8 +69,8 @@ static void equip_newunits(const struct equipment *eq, struct unit *u)
|
|||
if (btype != NULL) {
|
||||
building *b = new_building(btype, r, u->faction->locale);
|
||||
b->size = 10;
|
||||
u->building = b;
|
||||
fset(u, UFL_OWNER);
|
||||
u_set_building(u, b);
|
||||
building_set_owner(b, u);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -4438,7 +4438,7 @@ int sp_icastle(castorder * co)
|
|||
|
||||
if (mage->region == r) {
|
||||
if (leave(mage, false)) {
|
||||
mage->building = b;
|
||||
u_set_building(mage, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue