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.19 by pippijn, Fri Jun 2 01:32:36 2006 UTC vs.
Revision 1.21 by elmex, Fri Aug 11 23:04:50 2006 UTC

1/* 1/*
2 * static char *rcsid_player_c = 2 * static char *rcsid_player_c =
3 * "$Id: player.c,v 1.19 2006/06/02 01:32:36 pippijn Exp $"; 3 * "$Id: player.c,v 1.21 2006/08/11 23:04:50 elmex Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
489 489
490 mflags = get_map_flags(m, &m, x, y, &x, &y); 490 mflags = get_map_flags(m, &m, x, y, &x, &y);
491 blocked = (mflags & P_OUT_OF_MAP) ? MOVE_ALL : GET_MAP_MOVE_BLOCK(m, x, y); 491 blocked = (mflags & P_OUT_OF_MAP) ? MOVE_ALL : GET_MAP_MOVE_BLOCK(m, x, y);
492 492
493 /* Space is blocked - try changing direction a little */ 493 /* Space is blocked - try changing direction a little */
494 if ((mflags & P_OUT_OF_MAP) || ((OB_TYPE_MOVE_BLOCK(mon, blocked)) 494 if ((mflags & P_OUT_OF_MAP) || ((OB_TYPE_MOVE_BLOCK(mon, blocked) || (mflags&P_BLOCKSVIEW))
495 && (m == mon->map && blocked_link(mon, m, x, y)))) { 495 && (m == mon->map && blocked_link(mon, m, x, y)))) {
496 /* recalculate direction from last good location. Possible 496 /* recalculate direction from last good location. Possible
497 * we were not traversing ideal location before. 497 * we were not traversing ideal location before.
498 */ 498 */
499 get_rangevector_from_mapcoord(lastmap, lastx, lasty, pl, &rv, 0); 499 get_rangevector_from_mapcoord(lastmap, lastx, lasty, pl, &rv, 0);
533 m = lastmap; 533 m = lastmap;
534 mflags = get_map_flags(m, &m, x, y, &x, &y); 534 mflags = get_map_flags(m, &m, x, y, &x, &y);
535 if (mflags & P_OUT_OF_MAP) continue; 535 if (mflags & P_OUT_OF_MAP) continue;
536 blocked = GET_MAP_MOVE_BLOCK(m, x, y); 536 blocked = GET_MAP_MOVE_BLOCK(m, x, y);
537 if (OB_TYPE_MOVE_BLOCK(mon, blocked)) continue; 537 if (OB_TYPE_MOVE_BLOCK(mon, blocked)) continue;
538 if (mflags & P_BLOCKSVIEW) continue;
538 539
539 if (m == mon->map && blocked_link(mon, m, x, y)) break; 540 if (m == mon->map && blocked_link(mon, m, x, y)) break;
540 } 541 }
541 /* go through entire loop without finding a valid 542 /* go through entire loop without finding a valid
542 * sidestep to take - thus, no valid path. 543 * sidestep to take - thus, no valid path.
1049 insert_ob_in_map (op, op->map, op,0); 1050 insert_ob_in_map (op, op->map, op,0);
1050 strncpy(op->contr->title, op->arch->clone.name, sizeof(op->contr->title)-1); 1051 strncpy(op->contr->title, op->arch->clone.name, sizeof(op->contr->title)-1);
1051 op->contr->title[sizeof(op->contr->title)-1] = '\0'; 1052 op->contr->title[sizeof(op->contr->title)-1] = '\0';
1052 add_statbonus(op); 1053 add_statbonus(op);
1053 tmp_loop=allowed_class(op); 1054 tmp_loop=allowed_class(op);
1055
1056 if (!strncmp (op->msg, "Edit me", 7)) tmp_loop = 0; // pippijn fucked it up //D//TODO
1054 } 1057 }
1055 update_object(op,UP_OBJ_FACE); 1058 update_object(op,UP_OBJ_FACE);
1056 esrv_update_item(UPD_FACE,op,op); 1059 esrv_update_item(UPD_FACE,op,op);
1057 fix_player(op); 1060 fix_player(op);
1058 op->stats.hp=op->stats.maxhp; 1061 op->stats.hp=op->stats.maxhp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines