… | |
… | |
29 | #include <stdio.h> |
29 | #include <stdio.h> |
30 | #include <sys/types.h> |
30 | #include <sys/types.h> |
31 | #include <sys/uio.h> |
31 | #include <sys/uio.h> |
32 | #include <object.h> |
32 | #include <object.h> |
33 | #include <funcpoint.h> |
33 | #include <funcpoint.h> |
|
|
34 | #include <sproto.h> |
34 | #include <loader.h> |
35 | #include <loader.h> |
35 | |
36 | |
36 | #include <bitset> |
37 | #include <bitset> |
37 | |
38 | |
38 | int nrofallocobjects = 0; |
39 | int nrofallocobjects = 0; |
… | |
… | |
455 | object::set_weapon (object *ob) |
456 | object::set_weapon (object *ob) |
456 | { |
457 | { |
457 | if (current_weapon == ob) |
458 | if (current_weapon == ob) |
458 | return; |
459 | return; |
459 | |
460 | |
|
|
461 | new_draw_info_format (NDI_UNIQUE, 0, this, "You switch to your %s.", &ob->name); |
|
|
462 | |
|
|
463 | if (chosen_skill) |
|
|
464 | chosen_skill->flag [FLAG_APPLIED] = false; |
|
|
465 | |
460 | current_weapon = ob; |
466 | current_weapon = ob; |
461 | new_draw_info_format (NDI_UNIQUE, 0, this, "You switch to your %s.", &ob->name); |
467 | chosen_skill = ob->type == SKILL ? ob : find_skill_by_name (this, ob->skill); |
|
|
468 | |
|
|
469 | if (chosen_skill) |
|
|
470 | chosen_skill->flag [FLAG_APPLIED] = true; |
|
|
471 | |
462 | update_stats (); |
472 | update_stats (); |
463 | } |
473 | } |
464 | |
474 | |
465 | /* Zero the key_values on op, decrementing the shared-string |
475 | /* Zero the key_values on op, decrementing the shared-string |
466 | * refcounts and freeing the links. |
476 | * refcounts and freeing the links. |