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) { if (btype != NULL) {
building *b = new_building(btype, r, u->faction->locale); building *b = new_building(btype, r, u->faction->locale);
b->size = 10; b->size = 10;
u->building = b; u_set_building(u, b);
fset(u, UFL_OWNER); building_set_owner(b, u);
} }
} }
break; break;

View file

@ -4438,7 +4438,7 @@ int sp_icastle(castorder * co)
if (mage->region == r) { if (mage->region == r) {
if (leave(mage, false)) { if (leave(mage, false)) {
mage->building = b; u_set_building(mage, b);
} }
} }