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.106 by pippijn, Fri Mar 2 10:15:40 2007 UTC vs.
Revision 1.107 by root, Wed Mar 14 04:12:29 2007 UTC

2256 * Returns true if there are more actions we can do. 2256 * Returns true if there are more actions we can do.
2257 */ 2257 */
2258int 2258int
2259handle_newcs_player (object *op) 2259handle_newcs_player (object *op)
2260{ 2260{
2261 if (op->contr->hidden)
2262 {
2263 op->invisible = 1000;
2264 /* the socket code flashes the player visible/invisible
2265 * depending on the value of invisible, so we need to
2266 * alternate it here for it to work correctly.
2267 */
2268 if (pticks & 2)
2269 op->invisible--;
2270 }
2271 else if (op->invisible && !(QUERY_FLAG (op, FLAG_MAKE_INVIS)))
2272 {
2273 op->invisible--;
2274 if (!op->invisible)
2275 {
2276 make_visible (op);
2277 new_draw_info (NDI_UNIQUE, 0, op, "Your invisibility spell runs out.");
2278 }
2279 }
2280
2281 if (QUERY_FLAG (op, FLAG_SCARED)) 2261 if (QUERY_FLAG (op, FLAG_SCARED))
2282 { 2262 {
2283 flee_player (op); 2263 flee_player (op);
2284 /* If player is still scared, that is his action for this tick */ 2264 /* If player is still scared, that is his action for this tick */
2285 if (QUERY_FLAG (op, FLAG_SCARED)) 2265 if (QUERY_FLAG (op, FLAG_SCARED))
2438 int rate_sp = 2500; 2418 int rate_sp = 2500;
2439 int rate_grace = 2000; 2419 int rate_grace = 2000;
2440 const int max_hp = 1; 2420 const int max_hp = 1;
2441 const int max_sp = 1; 2421 const int max_sp = 1;
2442 const int max_grace = 1; 2422 const int max_grace = 1;
2423
2424 if (op->contr->hidden)
2425 {
2426 op->invisible = 1000;
2427 /* the socket code flashes the player visible/invisible
2428 * depending on the value of invisible, so we need to
2429 * alternate it here for it to work correctly.
2430 */
2431 if (pticks & 2)
2432 op->invisible--;
2433 }
2434 else if (op->invisible && !(QUERY_FLAG (op, FLAG_MAKE_INVIS)))
2435 {
2436 if (!op->invisible--)
2437 {
2438 make_visible (op);
2439 new_draw_info (NDI_UNIQUE, 0, op, "Your invisibility spell runs out.");
2440 }
2441 }
2443 2442
2444 if (op->contr->outputs_sync) 2443 if (op->contr->outputs_sync)
2445 { 2444 {
2446 for (i = 0; i < NUM_OUTPUT_BUFS; i++) 2445 for (i = 0; i < NUM_OUTPUT_BUFS; i++)
2447 if (op->contr->outputs[i].buf && (op->contr->outputs[i].first_update + op->contr->outputs_sync) < (uint16) pticks) 2446 if (op->contr->outputs[i].buf && (op->contr->outputs[i].first_update + op->contr->outputs_sync) < (uint16) pticks)
3071 if (op->type == PLAYER) 3070 if (op->type == PLAYER)
3072 { 3071 {
3073 op->contr->tmp_invis = 0; 3072 op->contr->tmp_invis = 0;
3074 op->contr->invis_race = 0; 3073 op->contr->invis_race = 0;
3075 } 3074 }
3075
3076 update_object (op, UP_OBJ_FACE); 3076 update_object (op, UP_OBJ_CHANGE);
3077} 3077}
3078 3078
3079int 3079int
3080is_true_undead (object *op) 3080is_true_undead (object *op)
3081{ 3081{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines