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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.32 by root, Mon Sep 11 23:53:30 2006 UTC vs.
Revision 1.34 by root, Tue Sep 12 01:09:53 2006 UTC

29#include <stdio.h> 29#include <stdio.h>
30#include <sys/types.h> 30#include <sys/types.h>
31#include <sys/uio.h> 31#include <sys/uio.h>
32#include <object.h> 32#include <object.h>
33#include <funcpoint.h> 33#include <funcpoint.h>
34#include <skills.h>
35#include <loader.h> 34#include <loader.h>
36 35
37int nrofallocobjects = 0; 36int nrofallocobjects = 0;
38 37
39object *objects; /* Pointer to the list of used objects */ 38object *objects; /* Pointer to the list of used objects */
2844 shstr key_ (key); 2843 shstr key_ (key);
2845 2844
2846 return set_ob_key_value_s (op, key_, value, add_key); 2845 return set_ob_key_value_s (op, key_, value, add_key);
2847} 2846}
2848 2847
2848object::depth_iterator::depth_iterator (object *container)
2849: iterator_base (container)
2850{
2851 while (item->inv)
2852 item = item->inv;
2853}
2854
2849void 2855void
2850object::deep_iterator::next () 2856object::depth_iterator::next ()
2851{ 2857{
2852 if (item->inv)
2853 item = item->inv;
2854 else if (item->below) 2858 if (item->below)
2859 {
2855 item = item->below; 2860 item = item->below;
2861
2862 while (item->inv)
2863 item = item->inv;
2864 }
2856 else 2865 else
2857 item = item->env->below; 2866 item = item->env;
2858} 2867}
2868

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines