ship and building owners encapsulated in accessors

This commit is contained in:
Enno Rehling 2012-05-17 15:23:44 -07:00
parent 76ba2b9303
commit 3d50745d77
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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);
}
}