ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/move.C
(Generate patch)

Comparing deliantra/server/server/move.C (file contents):
Revision 1.11 by root, Wed Dec 13 03:28:42 2006 UTC vs.
Revision 1.12 by root, Wed Dec 20 09:14:22 2006 UTC

77 * bail now - we know it can't work. 77 * bail now - we know it can't work.
78 */ 78 */
79 if (mflags & P_OUT_OF_MAP) 79 if (mflags & P_OUT_OF_MAP)
80 return 0; 80 return 0;
81 81
82
83 /* Is this space blocked? Players with wizpass are immune to 82 /* Is this space blocked? Players with wizpass are immune to
84 * this condition. 83 * this condition.
85 */ 84 */
86 if (blocked_link (op, m, newx, newy) && !QUERY_FLAG (op, FLAG_WIZPASS)) 85 if (blocked_link (op, m, newx, newy) && !QUERY_FLAG (op, FLAG_WIZPASS))
87 return 0; 86 return 0;
88 87
89 /* 0.94.2 - we need to set the direction for the new animation code. 88 /* 0.94.2 - we need to set the direction for the new animation code.
90 * it uses it to figure out face to use - I can't see it 89 * it uses it to figure out face to use - I can't see it
91 * breaking anything, but it might. 90 * breaking anything, but it might.
92 */ 91 */
93 if (op->more != NULL && !move_ob (op->more, dir, op->more->head)) 92 if (op->more && !move_ob (op->more, dir, op->more->head))
94 return 0; 93 return 0;
95 94
96 op->direction = dir; 95 op->direction = dir;
97 96
98 if (op->will_apply & 4) 97 if (op->will_apply & 4)
99 check_earthwalls (op, m, newx, newy); 98 check_earthwalls (op, m, newx, newy);
99
100 if (op->will_apply & 8) 100 if (op->will_apply & 8)
101 check_doors (op, m, newx, newy); 101 check_doors (op, m, newx, newy);
102 102
103 /* 0.94.1 - I got a stack trace that showed it crash with remove_ob trying 103 /* 0.94.1 - I got a stack trace that showed it crash with remove_ob trying
104 * to remove a removed object, and this function was the culprit. A possible 104 * to remove a removed object, and this function was the culprit. A possible
219 if (i == 0 && j == 0) 219 if (i == 0 && j == 0)
220 continue; 220 continue;
221 /* Perhaps this should be extended to support tiled maps */ 221 /* Perhaps this should be extended to support tiled maps */
222 if (OUT_OF_REAL_MAP (teleporter->map, teleporter->x + i, teleporter->y + j)) 222 if (OUT_OF_REAL_MAP (teleporter->map, teleporter->x + i, teleporter->y + j))
223 continue; 223 continue;
224 other_teleporter = get_map_ob (teleporter->map, teleporter->x + i, teleporter->y + j); 224 other_teleporter = GET_MAP_OB (teleporter->map, teleporter->x + i, teleporter->y + j);
225 225
226 while (other_teleporter) 226 while (other_teleporter)
227 { 227 {
228 if (other_teleporter->type == tele_type) 228 if (other_teleporter->type == tele_type)
229 break; 229 break;
327 mflags = get_map_flags (m, &m2, tx, ty, &tx, &ty); 327 mflags = get_map_flags (m, &m2, tx, ty, &tx, &ty);
328 328
329 if (mflags & P_OUT_OF_MAP) 329 if (mflags & P_OUT_OF_MAP)
330 return 1; 330 return 1;
331 331
332 for (tmp = get_map_ob (m2, tx, ty); tmp; tmp = tmp->above) 332 for (tmp = GET_MAP_OB (m2, tx, ty); tmp; tmp = tmp->above)
333 { 333 {
334 if (tmp->head == op || tmp == op) 334 if (tmp->head == op || tmp == op)
335 continue; 335 continue;
336 336
337 if ((QUERY_FLAG (tmp, FLAG_ALIVE) && tmp->type != DOOR)) 337 if ((QUERY_FLAG (tmp, FLAG_ALIVE) && tmp->type != DOOR))
378 move_block = GET_MAP_MOVE_BLOCK (m, x, y); 378 move_block = GET_MAP_MOVE_BLOCK (m, x, y);
379 379
380 /* If the target space is not blocked, no need to look at the objects on it */ 380 /* If the target space is not blocked, no need to look at the objects on it */
381 if ((op->move_type & move_block) == op->move_type) 381 if ((op->move_type & move_block) == op->move_type)
382 { 382 {
383 for (tmp = get_map_ob (m, x, y); tmp != NULL; tmp = tmp->above) 383 for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above)
384 { 384 {
385 if (tmp->head == op) 385 if (tmp->head == op)
386 continue; 386 continue;
387 if (OB_MOVE_BLOCK (op, tmp) && !roll_ob (tmp, dir, pusher)) 387 if (OB_MOVE_BLOCK (op, tmp) && !roll_ob (tmp, dir, pusher))
388 return 0; 388 return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines