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

Comparing deliantra/server/common/map.C (file contents):
Revision 1.165 by root, Tue Oct 20 05:57:08 2009 UTC vs.
Revision 1.166 by root, Wed Oct 21 00:44:39 2009 UTC

80 { 80 {
81 LOG (llevError, "blocked_link: Passed map, x, y coordinates outside of map\n"); 81 LOG (llevError, "blocked_link: Passed map, x, y coordinates outside of map\n");
82 return 1; 82 return 1;
83 } 83 }
84 84
85 /* Save some cycles - instead of calling get_map_flags(), just get the value
86 * directly.
87 */
88 mapspace &ms = m->at (sx, sy); 85 mapspace &ms = m->at (sx, sy);
89 86
90 int mflags = ms.flags (); 87 int mflags = ms.flags ();
91 int blocked = ms.move_block; 88 int blocked = ms.move_block;
92 89
116 */ 113 */
117 for (object *tmp = ms.bot; tmp; tmp = tmp->above) 114 for (object *tmp = ms.bot; tmp; tmp = tmp->above)
118 { 115 {
119 if (OB_MOVE_BLOCK (ob, tmp)) 116 if (OB_MOVE_BLOCK (ob, tmp))
120 { 117 {
118 if (INVOKE_OBJECT (BLOCKED_MOVE, tmp, ob))
119 if (RESULT_INT (0))
120 return 1;
121 else
122 continue;
123
121 if (tmp->type == CHECK_INV) 124 if (tmp->type == CHECK_INV)
122 { 125 {
123 bool have = check_inv_recursive (ob, tmp); 126 bool have = check_inv_recursive (ob, tmp);
124 127
125 // last_sp set means we block if we don't have. 128 // last_sp set means we block if we don't have.
130 { 133 {
131 // T_MATCH allows "entrance" iff the match is true 134 // T_MATCH allows "entrance" iff the match is true
132 // == blocks if the match fails 135 // == blocks if the match fails
133 136
134 // we could have used an INVOKE_OBJECT, but decided against it, as we 137 // we could have used an INVOKE_OBJECT, but decided against it, as we
135 // assume that T_MATCH is very common. 138 // assume that T_MATCH is relatively common.
136 if (!match (tmp->slaying, ob, tmp, ob)) 139 if (!match (tmp->slaying, ob, tmp, ob))
137 return 1; 140 return 1;
138 } 141 }
139 else 142 else
140 return 1; // unconditional block 143 return 1; // unconditional block

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines