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.193 by root, Wed Apr 30 07:08:34 2008 UTC vs.
Revision 1.194 by root, Sun May 4 19:41:51 2008 UTC

3071 * spot (surrounded by clear terrain in broad daylight). -b.t. 3071 * spot (surrounded by clear terrain in broad daylight). -b.t.
3072 */ 3072 */
3073void 3073void
3074do_hidden_move (object *op) 3074do_hidden_move (object *op)
3075{ 3075{
3076 int hide = 0, num = random_roll (0, 19, op, PREFER_LOW); 3076 int hide = 0;
3077 object *skop;
3078 3077
3079 if (!op || !op->map) 3078 if (!op || !op->map)
3080 return; 3079 return;
3081 3080
3082 skop = find_obj_by_type_subtype (op, SKILL, SK_HIDING); 3081 object *skop = find_obj_by_type_subtype (op, SKILL, SK_HIDING);
3082 int num = random_roll (0, 19, op, PREFER_LOW);
3083 3083
3084 /* its *extremely* hard to run and sneak/hide at the same time! */ 3084 /* its *extremely* hard to run and sneak/hide at the same time! */
3085 if (op->type == PLAYER && op->contr->run_on) 3085 if (op->type == PLAYER && op->contr->run_on)
3086 if (!skop || num >= skop->level) 3086 if (!skop || num >= skop->level)
3087 { 3087 {
3097 num -= hide; 3097 num -= hide;
3098 3098
3099 if ((op->type == PLAYER && hide < -10) || ((op->invisible -= num) <= 0)) 3099 if ((op->type == PLAYER && hide < -10) || ((op->invisible -= num) <= 0))
3100 { 3100 {
3101 make_visible (op); 3101 make_visible (op);
3102
3102 if (op->type == PLAYER) 3103 if (op->type == PLAYER)
3103 new_draw_info (NDI_UNIQUE, 0, op, "You moved out of hiding! You are visible!"); 3104 new_draw_info (NDI_UNIQUE, 0, op, "You moved out of hiding! You are visible!");
3104 } 3105 }
3105 else if (op->type == PLAYER && skop) 3106 else if (op->type == PLAYER && skop)
3106 change_exp (op, calc_skill_exp (op, NULL, skop), skop->skill, 0); 3107 change_exp (op, calc_skill_exp (op, NULL, skop), skop->skill, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines