1 | /* |
1 | /* |
2 | * static char *rcsid_utils_c = |
2 | * static char *rcsid_utils_c = |
3 | * "$Id: utils.c,v 1.1.1.2 2006/02/22 18:01:23 elmex Exp $"; |
3 | * "$Id: utils.c,v 1.1.1.3 2006/03/15 14:04:38 elmex Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
282 | |
282 | |
283 | if (!IS_ARMOR(op)) |
283 | if (!IS_ARMOR(op)) |
284 | return; |
284 | return; |
285 | |
285 | |
286 | mt = name_to_material(op->materialname); |
286 | mt = name_to_material(op->materialname); |
|
|
287 | if (!mt) { |
|
|
288 | LOG(llevError, "archetype '%s>%s' uses nonexistent material '%s'\n", op->arch->name, op->name, op->materialname); |
|
|
289 | return; |
|
|
290 | } |
287 | |
291 | |
288 | for (j=0; j < NROFATTACKS; j++) |
292 | for (j=0; j < NROFATTACKS; j++) |
289 | if (op->resist[j] == 0 && change->resist[j] != 0) { |
293 | if (op->resist[j] == 0 && change->resist[j] != 0) { |
290 | op->resist[j] += mt->mod[j]; |
294 | op->resist[j] += mt->mod[j]; |
291 | if (op->resist[j] > 100) |
295 | if (op->resist[j] > 100) |