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.174 by root, Tue Nov 10 05:05:22 2009 UTC vs.
Revision 1.175 by root, Tue Nov 10 05:06:02 2009 UTC

215 if (ms.blocks (move_type)) 215 if (ms.blocks (move_type))
216 return 1; 216 return 1;
217 } 217 }
218 218
219 return 0; 219 return 0;
220}
221
222/* When the map is loaded, load_object does not actually insert objects
223 * into inventory, but just links them. What this does is go through
224 * and insert them properly.
225 * The object 'container' is the object that contains the inventory.
226 * This is needed so that we can update the containers weight.
227 */
228static void
229fix_container (object *container)
230{
231 object *tmp = container->inv, *next;
232
233 container->inv = 0;
234 while (tmp)
235 {
236 next = tmp->below;
237 if (tmp->inv)
238 fix_container (tmp);
239
240 insert_ob_in_ob (tmp, container);
241 tmp = next;
242 }
243
244 // go through and calculate what all the containers are carrying.
245 //TODO: remove
246 container->update_weight ();
247} 220}
248 221
249//-GPL 222//-GPL
250 223
251void 224void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines