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.106 by root, Thu Jan 1 20:49:48 2009 UTC vs.
Revision 1.107 by elmex, Mon Jan 12 00:17:23 2009 UTC

159 * object with +/- glow_radius and an "other_arch" to change to. 159 * object with +/- glow_radius and an "other_arch" to change to.
160 * (and please note that we cant fail our save and reach this 160 * (and please note that we cant fail our save and reach this
161 * function if the object doesnt contain a material that can burn. 161 * function if the object doesnt contain a material that can burn.
162 * So forget lighting magical swords on fire with this!) -b.t. 162 * So forget lighting magical swords on fire with this!) -b.t.
163 */ 163 */
164 if (type & (AT_FIRE | AT_ELECTRICITY) && op->other_arch && QUERY_FLAG (op, FLAG_IS_LIGHTABLE)) 164 if (type & (AT_FIRE | AT_ELECTRICITY)
165 && (QUERY_FLAG (op, FLAG_IS_LIGHTABLE)
166 || op->type == LAMP
167 || op->type == TORCH
165 { 168 ))
166 const char *arch = op->other_arch->archname; 169 {
167 170 switch (op->type)
168 if (op->decrease ())
169 fix_stopped_item (op, m, originator);
170
171 if ((op = archetype::get (arch)))
172 { 171 {
172 case LAMP:
173 // turn on a lamp
174 apply_lamp (op, true);
175 break;
176
177 default:
178 // for instance icecubes:
179 if (op->other_arch)
180 {
181 const char *arch = op->other_arch->archname;
182
183 if (op->decrease ())
184 fix_stopped_item (op, m, originator);
185
186 if ((op = archetype::get (arch)))
187 {
173 if (env) 188 if (env)
174 env->insert (op); 189 env->insert (op);
175 else 190 else
176 m->insert (op, x, y, originator); 191 m->insert (op, x, y, originator);
192 }
193 }
177 } 194 }
178
179 return; 195 return;
180 } 196 }
181 197
182 if (type & AT_CANCELLATION) 198 if (type & AT_CANCELLATION)
183 { /* Cancellation. */ 199 { /* Cancellation. */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines