Fix weight of containers in lev_comp

This commit is contained in:
Pasi Kallinen
2016-01-06 18:25:50 +02:00
parent 785aba242a
commit 0a25502593
2 changed files with 6 additions and 4 deletions
+1
View File
@@ -99,6 +99,7 @@ zapping wand of opening at yourself, unlock carried boxes
dissolve iron bars by force-fighting with wielded potion of acid dissolve iron bars by force-fighting with wielded potion of acid
poison breath leaves a trail of poison gas poison breath leaves a trail of poison gas
make vault guard accept names starting with number make vault guard accept names starting with number
fix weight of containers in special levels
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+5 -4
View File
@@ -1873,11 +1873,12 @@ struct mkroom *croom;
} }
} }
} else { } else {
struct obj *cobj = container_obj[container_idx - 1];
remove_object(otmp); remove_object(otmp);
if (container_obj[container_idx - 1]) if (cobj) {
(void) add_to_container(container_obj[container_idx - 1], (void) add_to_container(cobj, otmp);
otmp); cobj->owt = weight(cobj);
else { } else {
obj_extract_self(otmp); obj_extract_self(otmp);
obfree(otmp, NULL); obfree(otmp, NULL);
return; return;