… | |
… | |
1008 | } |
1008 | } |
1009 | |
1009 | |
1010 | // already applied == open on ground, or open in inv, or active in inv |
1010 | // already applied == open on ground, or open in inv, or active in inv |
1011 | if (sack->flag [FLAG_APPLIED]) |
1011 | if (sack->flag [FLAG_APPLIED]) |
1012 | { |
1012 | { |
1013 | if (op->container == sack) |
1013 | if (op->container_ () == sack) |
1014 | { |
1014 | { |
1015 | // open on ground or inv, so close |
1015 | // open on ground or inv, so close |
1016 | op->close_container (); |
1016 | op->close_container (); |
1017 | return 1; |
1017 | return 1; |
1018 | } |
1018 | } |
… | |
… | |
2844 | * we don't use a corrupt pointer for the next object, so we get the |
2844 | * we don't use a corrupt pointer for the next object, so we get the |
2845 | * next object in the stack before applying. This is can only be a |
2845 | * next object in the stack before applying. This is can only be a |
2846 | * problem if player_apply() has a bug in that it uses the object but does |
2846 | * problem if player_apply() has a bug in that it uses the object but does |
2847 | * not return a proper value. |
2847 | * not return a proper value. |
2848 | */ |
2848 | */ |
2849 | for (object *next, *tmp = pl->container ? pl->container->inv : pl->below; tmp; tmp = next) |
2849 | for (object *next, *tmp = pl->container_ () ? pl->container_ ()->inv : pl->below; tmp; tmp = next) |
2850 | { |
2850 | { |
2851 | next = tmp->below; |
2851 | next = tmp->below; |
2852 | |
2852 | |
2853 | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) |
2853 | if (QUERY_FLAG (tmp, FLAG_IS_FLOOR)) |
2854 | floors++; |
2854 | floors++; |