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.112 by root, Mon Jan 8 14:11:04 2007 UTC vs.
Revision 1.115 by root, Mon Jan 15 01:39:42 2007 UTC

660 660
661 if (op->more) 661 if (op->more)
662 update_object (op->more, action); 662 update_object (op->more, action);
663} 663}
664 664
665object *object::first;
666
667object::object () 665object::object ()
668{ 666{
669 SET_FLAG (this, FLAG_REMOVED); 667 SET_FLAG (this, FLAG_REMOVED);
670 668
671 expmul = 1.0; 669 expmul = 1.0;
2165 2163
2166 return 3; 2164 return 3;
2167} 2165}
2168 2166
2169/* 2167/*
2170 * absdir(int): Returns a number between 1 and 8, which represent
2171 * the "absolute" direction of a number (it actually takes care of
2172 * "overflow" in previous calculations of a direction).
2173 */
2174
2175int
2176absdir (int d)
2177{
2178 while (d < 1)
2179 d += 8;
2180
2181 while (d > 8)
2182 d -= 8;
2183
2184 return d;
2185}
2186
2187/*
2188 * dirdiff(dir1, dir2) returns how many 45-degrees differences there is 2168 * dirdiff(dir1, dir2) returns how many 45-degrees differences there is
2189 * between two directions (which are expected to be absolute (see absdir()) 2169 * between two directions (which are expected to be absolute (see absdir())
2190 */ 2170 */
2191
2192int 2171int
2193dirdiff (int dir1, int dir2) 2172dirdiff (int dir1, int dir2)
2194{ 2173{
2195 int d; 2174 int d;
2196 2175
2635{ 2614{
2636 static char info[256 * 4]; 2615 static char info[256 * 4];
2637 return debug_desc (info); 2616 return debug_desc (info);
2638} 2617}
2639 2618
2619const char *
2620object::debug_desc2 () const
2621{
2622 static char info[256 * 4];
2623 return debug_desc (info);
2624}
2625

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines