bug 2400: magicbag preservation

This commit is contained in:
Enno Rehling 2017-12-31 13:14:44 +01:00
parent 0686e6ceba
commit 0440fcc11c
2 changed files with 3 additions and 7 deletions

View File

@ -46,7 +46,7 @@
</resource> </resource>
<resource name="magicbag"> <resource name="magicbag">
<item big="yes" weight="100" score="6000"/> <item notlost="yes" big="yes" weight="100" score="6000"/>
</resource> </resource>
<resource name="magicherbbag" appearance=""> <resource name="magicherbbag" appearance="">

View File

@ -408,13 +408,9 @@ void save_special_items(unit *usrc)
static int cache; static int cache;
static const char *name = NULL; static const char *name = NULL;
if (rc_changed(&cache)) { if (rc_changed(&cache)) {
rc_ghost = rc_find("ghost");
if (!rc_ghost) {
rc_ghost = get_race(RC_TEMPLATE); rc_ghost = get_race(RC_TEMPLATE);
name = "ghost"; name = "ghost";
} }
assert(rc_ghost);
}
for (u = r->units; u; u = u->next) { for (u = r->units; u; u = u->next) {
if (u->faction == fm) { if (u->faction == fm) {
give_special_items(u, &usrc->items); give_special_items(u, &usrc->items);