1 | /* |
1 | /* |
2 | * CrossFire, A Multiplayer game for X-windows |
2 | * CrossFire, A Multiplayer game |
3 | * |
3 | * |
4 | * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
4 | * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
5 | * Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (C) 1992 Frank Tore Johansen |
6 | * Copyright (C) 1992 Frank Tore Johansen |
7 | * |
7 | * |
… | |
… | |
230 | * start with equipment, but only their abilities). |
230 | * start with equipment, but only their abilities). |
231 | */ |
231 | */ |
232 | static void |
232 | static void |
233 | put_treasure (object *op, object *creator, int flags) |
233 | put_treasure (object *op, object *creator, int flags) |
234 | { |
234 | { |
|
|
235 | if (flags & GT_ENVIRONMENT) |
|
|
236 | { |
235 | /* Bit of a hack - spells should never be put onto the map. The entire |
237 | /* Bit of a hack - spells should never be put onto the map. The entire |
236 | * treasure stuff is a problem - there is no clear idea of knowing |
238 | * treasure stuff is a problem - there is no clear idea of knowing |
237 | * this is the original object, or if this is an object that should be created |
239 | * this is the original object, or if this is an object that should be created |
238 | * by another object. |
240 | * by another object. |
239 | */ |
241 | */ |
240 | if (flags & GT_ENVIRONMENT && op->type != SPELL) |
242 | //TODO: flag such as objects... as such (no drop, anybody?) |
241 | { |
243 | if (op->type == SPELL) |
|
|
244 | { |
|
|
245 | op->destroy (); |
|
|
246 | return; |
|
|
247 | } |
|
|
248 | |
|
|
249 | op->expand_tail (); |
|
|
250 | |
242 | if (ob_blocked (op, creator->map, creator->x, creator->y)) |
251 | if (ob_blocked (op, creator->map, creator->x, creator->y)) |
243 | op->destroy (); |
252 | op->destroy (); |
244 | else |
253 | else |
245 | { |
254 | { |
246 | SET_FLAG (op, FLAG_OBJ_ORIGINAL); |
255 | SET_FLAG (op, FLAG_OBJ_ORIGINAL); |