… | |
… | |
104 | if (tmp == NULL) |
104 | if (tmp == NULL) |
105 | return 0; |
105 | return 0; |
106 | |
106 | |
107 | if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED)) |
107 | if (QUERY_FLAG (tmp, FLAG_CURSED) || QUERY_FLAG (tmp, FLAG_DAMNED)) |
108 | { |
108 | { |
109 | tmp->destroy (true); |
109 | tmp->destroy (); |
110 | tmp = NULL; |
110 | tmp = NULL; |
111 | } |
111 | } |
112 | } |
112 | } |
113 | while (!tmp); |
113 | while (!tmp); |
114 | |
114 | |
… | |
… | |
123 | if (op->has_random_items ()) |
123 | if (op->has_random_items ()) |
124 | while ((op->stats.hp--) > 0) |
124 | while ((op->stats.hp--) > 0) |
125 | create_treasure (op->randomitems, op, GT_ENVIRONMENT, |
125 | create_treasure (op->randomitems, op, GT_ENVIRONMENT, |
126 | op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0); |
126 | op->stats.exp ? op->stats.exp : op->map == NULL ? 14 : op->map->difficulty, 0); |
127 | |
127 | |
128 | op->destroy (true); |
128 | op->destroy (); |
129 | break; |
129 | break; |
130 | } |
130 | } |
131 | |
131 | |
132 | return tmp ? 1 : 0; |
132 | return tmp ? 1 : 0; |
133 | } |
133 | } |
… | |
… | |
171 | } |
171 | } |
172 | for (x = 0; x < m->width; x++) |
172 | for (x = 0; x < m->width; x++) |
173 | for (y = 0; y < m->height; y++) |
173 | for (y = 0; y < m->height; y++) |
174 | for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above) |
174 | for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above) |
175 | if (tmp->above && (tmp->type == TRIGGER_BUTTON || tmp->type == TRIGGER_PEDESTAL)) |
175 | if (tmp->above && (tmp->type == TRIGGER_BUTTON || tmp->type == TRIGGER_PEDESTAL)) |
176 | check_trigger (tmp, tmp->above); |
176 | check_trigger (tmp, tmp->above, tmp->above); |
177 | } |
177 | } |
178 | |
178 | |
179 | /** |
179 | /** |
180 | * Those are dummy functions defined to resolve all symboles. |
180 | * Those are dummy functions defined to resolve all symboles. |
181 | * Added as part of glue cleaning. |
181 | * Added as part of glue cleaning. |