Changeset 796
- Timestamp:
- 03/19/08 15:27:14 (5 months ago)
- Files:
-
- trunk/src/cmd6.c (modified) (5 diffs)
- trunk/src/spells2.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/cmd6.c
r755 r796 120 120 bool was_aware = object_aware_p(o_ptr); 121 121 int dir = 5; 122 int px = p_ptr->px, py = p_ptr->py; 122 123 123 124 /* Figure out effect to use */ … … 197 198 } 198 199 199 200 /* Some uses are "free" */201 if (!used) return;202 203 200 /* Chargeables act differently to single-used items when not used up */ 204 if (use == USE_CHARGE)201 if (used && use == USE_CHARGE) 205 202 { 206 203 /* Use a single charge */ … … 213 210 floor_item_charges(0 - item); 214 211 } 215 else if (use == USE_TIMEOUT)212 else if (used && use == USE_TIMEOUT) 216 213 { 217 214 /* Artifacts use their own special field */ … … 227 224 } 228 225 } 229 else if (use == USE_SINGLE)226 else if (used && use == USE_SINGLE) 230 227 { 231 228 /* Destroy a potion in the pack */ … … 245 242 } 246 243 } 244 245 /* Hack to make Glyph of Warding work properly */ 246 if (cave_feat[py][px] == FEAT_GLYPH) 247 { 248 /* Shift any objects to further away */ 249 for (o_ptr = get_first_object(py, px); o_ptr; o_ptr = get_next_object(o_ptr)) 250 { 251 drop_near(o_ptr, 0, py, px); 252 } 253 254 /* Delete the "moved" objects from their original position */ 255 delete_object(py, px); 256 } 257 258 247 259 } trunk/src/spells2.c
r789 r796 98 98 void warding_glyph(void) 99 99 { 100 object_type *o_ptr;101 100 int py = p_ptr->py; 102 101 int px = p_ptr->px; … … 110 109 /* Create a glyph */ 111 110 cave_set_feat(py, px, FEAT_GLYPH); 112 113 /* Shift any objects to further away */114 for (o_ptr = get_first_object(py, px); o_ptr; o_ptr = get_next_object(o_ptr))115 {116 drop_near(o_ptr, 0, py, px);117 }118 119 /* Delete the "moved" objects from their original position */120 delete_object(py, px);121 111 } 122 112
