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.292 by root, Wed Nov 14 05:18:18 2012 UTC vs.
Revision 1.293 by root, Mon Nov 26 15:12:16 2012 UTC

2190 int rate_grace = 2000; 2190 int rate_grace = 2000;
2191 const int max_hp = 1; 2191 const int max_hp = 1;
2192 const int max_sp = 1; 2192 const int max_sp = 1;
2193 const int max_grace = 1; 2193 const int max_grace = 1;
2194 2194
2195#if 0
2195 if (op->contr->hidden) 2196 if (op->contr->hidden)
2196 { 2197 {
2197 op->invisible = 1000; 2198 op->invisible = 1000;
2198 /* the socket code flashes the player visible/invisible 2199 /* the socket code flashes the player visible/invisible
2199 * depending on the value of invisible, so we need to 2200 * depending on the value of invisible, so we need to
2200 * alternate it here for it to work correctly. 2201 * alternate it here for it to work correctly.
2201 */ 2202 */
2202 if (server_tick & 2) 2203 if (server_tick & 2)
2203 op->invisible--; 2204 op->invisible--;
2204 } 2205 }
2206 else
2207#endif
2205 else if (op->invisible && !(op->flag [FLAG_MAKE_INVIS])) 2208 if (op->invisible && !(op->flag [FLAG_MAKE_INVIS]))
2206 { 2209 {
2207 if (!op->invisible--) 2210 if (!op->invisible--)
2208 { 2211 {
2209 make_visible (op); 2212 make_visible (op);
2210 new_draw_info (NDI_UNIQUE, 0, op, "Your invisibility spell runs out."); 2213 new_draw_info (NDI_UNIQUE, 0, op, "Your invisibility spell runs out.");
2963 for (tmp = GET_MAP_OB (m, x, y); tmp; tmp = tmp->above) 2966 for (tmp = GET_MAP_OB (m, x, y); tmp; tmp = tmp->above)
2964 { 2967 {
2965 if ((player ||friendly) &&tmp->flag [FLAG_MONSTER] && !tmp->flag [FLAG_UNAGGRESSIVE]) 2968 if ((player ||friendly) &&tmp->flag [FLAG_MONSTER] && !tmp->flag [FLAG_UNAGGRESSIVE])
2966 return 1; 2969 return 1;
2967 else if (tmp->type == PLAYER) 2970 else if (tmp->type == PLAYER)
2968 {
2969 /*don't let a hidden DM prevent you from hiding */
2970 if (!tmp->flag [FLAG_WIZ] || tmp->contr->hidden == 0)
2971 return 1; 2971 return 1;
2972 }
2973 } 2972 }
2974 } 2973 }
2975 return 0; 2974 return 0;
2976} 2975}
2977 2976
2978/* check the player los field for viewability of the 2977/* check the player los field for viewability of the
2979 * object op. This function works fine for monsters, 2978 * object op. This function works fine for monsters,
2980 * but we dont worry if the object isnt the top one in 2979 * but we dont worry if the object isnt the top one in
2981 * a pile (say a coin under a table would return "viewable" 2980 * a pile (say a coin under a table would return "viewable"
2982 * by this routine). Another question, should we be 2981 * by this routine). Another question, should we be
2983 * concerned with the direction the player is looking 2982 * concerned with the direction the player is looking
2984 * in? Realistically, most of us can't see stuff behind 2983 * in? Realistically, most of us can't see stuff behind
2985 * our backs...on the other hand, does the "facing" direction 2984 * our backs...on the other hand, does the "facing" direction
2986 * imply the way your head, or body is facing? It's possible 2985 * imply the way your head, or body is facing? It's possible
2987 * for them to differ. Sigh, this fctn could get a bit more complex. 2986 * for them to differ. Sigh, this fctn could get a bit more complex.
2988 * -b.t. 2987 * -b.t.
2989 * This function is now map tiling safe. 2988 * This function is now map tiling safe.
2990 */ 2989 */
2991int 2990int
2992player_can_view (object *pl, object *op) 2991player_can_view (object *pl, object *op)
2993{ 2992{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines