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.162 by root, Thu Aug 23 17:13:04 2007 UTC vs.
Revision 1.167 by root, Thu Aug 30 05:24:14 2007 UTC

183 183
184 if (ob->map) 184 if (ob->map)
185 maplevel = ob->map->path; 185 maplevel = ob->map->path;
186 186
187 ob->remove (); 187 ob->remove ();
188 ob->enemy = 0; // sometimes keeps an extra refcount on itself
188 ob->map = 0; 189 ob->map = 0;
189 party = 0; 190 party = 0;
190 191
191 combat_ob = ranged_ob = 0; //TODO, should be special marker, non-refcounted, not this 192 combat_ob = ranged_ob = 0; //TODO, should be special marker, non-refcounted, not this
192 193
2635 { 2636 {
2636 tmp->destroy (); 2637 tmp->destroy ();
2637 new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer"); 2638 new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer");
2638 } 2639 }
2639 2640
2640 cure_disease (op, 0); /* remove any disease */ 2641 cure_disease (op, 0, 0); /* remove any disease */
2641 op->stats.hp = op->stats.maxhp; 2642 op->stats.hp = op->stats.maxhp;
2642 if (op->stats.food <= 0) 2643 if (op->stats.food <= 0)
2643 op->stats.food = 999; 2644 op->stats.food = 999;
2644 2645
2645 /* create a bodypart-trophy to make the winner happy */ 2646 /* create a bodypart-trophy to make the winner happy */
2845 { 2846 {
2846 tmp->destroy (); 2847 tmp->destroy ();
2847 new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer"); 2848 new_draw_info (NDI_UNIQUE, 0, tmp, "Your mind feels clearer");
2848 } 2849 }
2849 2850
2850 cure_disease (op, 0); /* remove any disease */ 2851 cure_disease (op, 0, 0); /* remove any disease */
2851 2852
2852 /*add_exp(op, (op->stats.exp * -0.20)); */ 2853 /*add_exp(op, (op->stats.exp * -0.20)); */
2853 apply_death_exp_penalty (op); 2854 apply_death_exp_penalty (op);
2854 if (op->stats.food < 100) 2855 if (op->stats.food < 100)
2855 op->stats.food = 900; 2856 op->stats.food = 900;
3009void 3010void
3010make_visible (object *op) 3011make_visible (object *op)
3011{ 3012{
3012 op->hide = 0; 3013 op->hide = 0;
3013 op->invisible = 0; 3014 op->invisible = 0;
3015
3014 if (op->type == PLAYER) 3016 if (op->type == PLAYER)
3015 { 3017 {
3016 op->contr->tmp_invis = 0; 3018 op->contr->tmp_invis = 0;
3017 op->contr->invis_race = 0; 3019 op->contr->invis_race = 0;
3018 } 3020 }
3031 3033
3032/* look at the surrounding terrain to determine 3034/* look at the surrounding terrain to determine
3033 * the hideability of this object. Positive levels 3035 * the hideability of this object. Positive levels
3034 * indicate greater hideability. 3036 * indicate greater hideability.
3035 */ 3037 */
3036
3037int 3038int
3038hideability (object *ob) 3039hideability (object *ob)
3039{ 3040{
3040 int i, level = 0, mflag; 3041 int i, level = 0, mflag;
3041 sint16 x, y; 3042 sint16 x, y;
3320 char buf[MAX_BUF]; /* tmp. string buffer */ 3321 char buf[MAX_BUF]; /* tmp. string buffer */
3321 int i = 0, j = 0; 3322 int i = 0, j = 0;
3322 3323
3323 /* get the appropriate treasurelist */ 3324 /* get the appropriate treasurelist */
3324 if (atnr == ATNR_FIRE) 3325 if (atnr == ATNR_FIRE)
3325 trlist = treasurelist::find ("dragon_ability_fire"); 3326 trlist = treasurelist::find (shstr_dragon_ability_fire);
3326 else if (atnr == ATNR_COLD) 3327 else if (atnr == ATNR_COLD)
3327 trlist = treasurelist::find ("dragon_ability_cold"); 3328 trlist = treasurelist::find (shstr_dragon_ability_cold);
3328 else if (atnr == ATNR_ELECTRICITY) 3329 else if (atnr == ATNR_ELECTRICITY)
3329 trlist = treasurelist::find ("dragon_ability_elec"); 3330 trlist = treasurelist::find (shstr_dragon_ability_elec);
3330 else if (atnr == ATNR_POISON) 3331 else if (atnr == ATNR_POISON)
3331 trlist = treasurelist::find ("dragon_ability_poison"); 3332 trlist = treasurelist::find (shstr_dragon_ability_poison);
3332 3333
3333 if (trlist == NULL || who->type != PLAYER) 3334 if (trlist == NULL || who->type != PLAYER)
3334 return; 3335 return;
3335 3336
3336 for (i = 0, tr = trlist->items; tr != NULL && i < level - 1; tr = tr->next, i++); 3337 for (i = 0, tr = trlist->items; tr != NULL && i < level - 1; tr = tr->next, i++);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines