ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/treasure.C
(Generate patch)

Comparing deliantra/server/common/treasure.C (file contents):
Revision 1.55 by root, Sat Apr 21 22:05:52 2007 UTC vs.
Revision 1.56 by root, Sat Apr 21 22:12:59 2007 UTC

230 * start with equipment, but only their abilities). 230 * start with equipment, but only their abilities).
231 */ 231 */
232static void 232static void
233put_treasure (object *op, object *creator, int flags) 233put_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
242 op->expand_tail (); 249 op->expand_tail ();
243 250
244 if (ob_blocked (op, creator->map, creator->x, creator->y)) 251 if (ob_blocked (op, creator->map, creator->x, creator->y))
245 op->destroy (); 252 op->destroy ();
246 else 253 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines