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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.167 by root, Thu Aug 30 05:24:14 2007 UTC vs.
Revision 1.168 by root, Sat Sep 1 03:56:34 2007 UTC

2594 * file. 2594 * file.
2595 */ 2595 */
2596void 2596void
2597kill_player (object *op) 2597kill_player (object *op)
2598{ 2598{
2599 int x, y;
2599 char buf[MAX_BUF]; 2600 char buf[MAX_BUF];
2600 int x, y;
2601
2602 //int i;
2603 maptile *map; /* this is for resurrection */ 2601 maptile *map; /* this is for resurrection */
2604
2605 /* int z;
2606 int num_stats_lose;
2607 int lost_a_stat;
2608 int lose_this_stat;
2609 int this_stat; */
2610 int will_kill_again; 2602 int will_kill_again;
2611 archetype *at; 2603 archetype *at;
2612 object *tmp; 2604 object *tmp;
2613 2605
2614 if (save_life (op)) 2606 if (save_life (op))
2644 op->stats.food = 999; 2636 op->stats.food = 999;
2645 2637
2646 /* create a bodypart-trophy to make the winner happy */ 2638 /* create a bodypart-trophy to make the winner happy */
2647 if (object *tmp = arch_to_object (archetype::find ("finger"))) 2639 if (object *tmp = arch_to_object (archetype::find ("finger")))
2648 { 2640 {
2649 sprintf (buf, "%s's finger", &op->name); 2641 tmp->name = format ("%s's finger" , &op->name);
2650 tmp->name = buf; 2642 tmp->name_pl = format ("%s's fingers", &op->name);
2651 sprintf (buf, " This finger has been cut off %s\n" 2643 tmp->msg = format (
2652 " the %s, when he was defeated at\n level %d by %s.\n", 2644 "This finger has been cut off of %s the %s, when he was defeated at level %d by %s.\n",
2653 &op->name, op->contr->title, (int) (op->level), op->contr->killer); 2645 &op->name, op->contr->title, (int) (op->level), op->contr->killer
2654 tmp->msg = buf; 2646 );
2655 tmp->value = 0, tmp->type = 0; 2647 tmp->value = 0, tmp->type = 0;
2656 tmp->materialname = "organics"; 2648 tmp->materialname = "organics";
2657 tmp->insert_at (op, tmp); 2649 tmp->insert_at (op, tmp);
2658 } 2650 }
2659 2651
2666 INVOKE_PLAYER (DEATH, op->contr); 2658 INVOKE_PLAYER (DEATH, op->contr);
2667 2659
2668 command_kill_pets (op, 0); 2660 command_kill_pets (op, 0);
2669 2661
2670 if (op->stats.food < 0) 2662 if (op->stats.food < 0)
2671 {
2672 sprintf (buf, "%s starved to death.", &op->name);
2673 strcpy (op->contr->killer, "starvation"); 2663 strcpy (op->contr->killer, "starvation");
2674 }
2675 else
2676 sprintf (buf, "%s died.", &op->name);
2677 2664
2678 op->contr->play_sound (sound_find ("player_dies")); 2665 op->contr->play_sound (sound_find ("player_dies"));
2679 2666
2680 /* save the map location for corpse, gravestone */ 2667 /* save the map location for corpse, gravestone */
2681 x = op->x; 2668 x = op->x;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines