… | |
… | |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * it under the terms of the GNU General Public License as published by |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * the Free Software Foundation, either version 3 of the License, or |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * (at your option) any later version. |
11 | * option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the Affero GNU General Public License |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * and the GNU General Public License along with this program. If not, see |
|
|
20 | * <http://www.gnu.org/licenses/>. |
20 | * |
21 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
23 | */ |
23 | |
24 | |
24 | /* |
25 | /* |
… | |
… | |
1229 | { |
1230 | { |
1230 | /* remove an old force with a slaying field == op->name */ |
1231 | /* remove an old force with a slaying field == op->name */ |
1231 | if (object *force = tmp->force_find (op->name)) |
1232 | if (object *force = tmp->force_find (op->name)) |
1232 | force->destroy (); |
1233 | force->destroy (); |
1233 | |
1234 | |
1234 | if (!tmp->force_find (op->slaying)) |
1235 | if (op->slaying && !tmp->force_find (op->slaying)) |
1235 | { |
1236 | { |
1236 | tmp->force_add (op->slaying, op->stats.food); |
1237 | tmp->force_add (op->slaying, op->stats.food); |
1237 | |
1238 | |
1238 | if (op->msg) |
1239 | if (op->msg) |
1239 | new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, tmp, op->msg); |
1240 | new_draw_info (NDI_UNIQUE | NDI_NAVY, 0, tmp, op->msg); |
… | |
… | |
1270 | op->set_speed (0); |
1271 | op->set_speed (0); |
1271 | return; |
1272 | return; |
1272 | } |
1273 | } |
1273 | else |
1274 | else |
1274 | { |
1275 | { |
1275 | // check whether the face might needs to be updated |
1276 | // check whether the face might need to be updated |
1276 | // (currently this is needed to have already switched on torches |
1277 | // (currently this is needed to have already switched on torches |
1277 | // on maps, as they just set the glow_radius in the archetype) |
1278 | // on maps, as they just set the glow_radius in the archetype) |
1278 | if (op->other_arch |
1279 | if (op->other_arch |
1279 | && ( |
1280 | && ( |
1280 | (op->flag [FLAG_ANIMATE] != op->other_arch->flag [FLAG_ANIMATE]) |
1281 | (op->flag [FLAG_ANIMATE] != op->other_arch->flag [FLAG_ANIMATE]) |
1281 | || (op->flag [FLAG_ANIMATE] |
1282 | || (op->flag [FLAG_ANIMATE] |
1282 | ? (op->animation_id != op->other_arch->animation_id) |
1283 | ? (op->animation_id != op->other_arch->animation_id) |
1283 | : (op->face != op->other_arch->face)) |
1284 | : (op->face != op->other_arch->face)) |
1284 | )) |
1285 | )) |
1285 | get_animation_from_arch (op, op->other_arch); |
1286 | get_animation_from_arch (op, op->other_arch); |
1286 | } |
1287 | } |
1287 | |
1288 | |
1288 | // lamps and torches auf maps don't use up their fuel |
1289 | // lamps and torches on maps don't use up their fuel |
1289 | if (op->is_on_map ()) |
1290 | if (op->is_on_map ()) |
1290 | return; |
1291 | return; |
1291 | |
1292 | |
1292 | if (op->stats.food > 0) |
1293 | if (op->stats.food > 0) |
1293 | { |
1294 | { |