From 3d50745d773ebbbaa3934196a1699a2afe5ffa73 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 17 May 2012 15:23:44 -0700 Subject: [PATCH] ship and building owners encapsulated in accessors --- src/races/races.c | 4 ++-- src/spells/spells.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/races/races.c b/src/races/races.c index 519a51940..cc3e9ea56 100644 --- a/src/races/races.c +++ b/src/races/races.c @@ -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; diff --git a/src/spells/spells.c b/src/spells/spells.c index 9894c43d0..74d702572 100644 --- a/src/spells/spells.c +++ b/src/spells/spells.c @@ -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); } }