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

Comparing deliantra/server/server/attack.C (file contents):
Revision 1.87 by root, Mon Jul 14 18:36:43 2008 UTC vs.
Revision 1.88 by root, Wed Jul 16 14:29:40 2008 UTC

148 object *env = op->env; 148 object *env = op->env;
149 int x = op->x, y = op->y; 149 int x = op->x, y = op->y;
150 maptile *m = op->map; 150 maptile *m = op->map;
151 151
152 op = stop_item (op); 152 op = stop_item (op);
153 if (op == NULL) 153 if (!op)
154 return; 154 return;
155 155
156 /* Hacked the following so that type LIGHTER will work. 156 /* Hacked the following so that type LIGHTER will work.
157 * Also, objects which are potential "lights" that are hit by 157 * Also, objects which are potential "lights" that are hit by
158 * flame/elect attacks will be set to glow. "lights" are any 158 * flame/elect attacks will be set to glow. "lights" are any
192 fix_stopped_item (op, m, originator); 192 fix_stopped_item (op, m, originator);
193 } 193 }
194 else 194 else
195 { 195 {
196 // drop everything to the ground, if possible 196 // drop everything to the ground, if possible
197 while (op->inv)
198 op->inv->insert_at (originator); 197 op->insert_at (originator);
199
200 op->destroy (); 198 op->destroy ();
201 } 199 }
202 200
203 if (type & (AT_FIRE | AT_ELECTRICITY)) 201 if (type & (AT_FIRE | AT_ELECTRICITY))
204 if (env) 202 if (env)
212 210
213 return; 211 return;
214 } 212 }
215 213
216 /* The value of 50 is arbitrary. */ 214 /* The value of 50 is arbitrary. */
217 if (type & AT_COLD && (op->resist[ATNR_COLD] < 50) && !QUERY_FLAG (op, FLAG_NO_PICK) && (RANDOM () & 2)) 215 if (type & AT_COLD && (op->resist[ATNR_COLD] < 50) && !QUERY_FLAG (op, FLAG_NO_PICK) && rndm (2))
218 { 216 {
219 archetype *at = archetype::find (shstr_icecube); 217 archetype *at = archetype::find (shstr_icecube);
220 218
221 if (at == NULL) 219 if (at == NULL)
222 return; 220 return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines