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.294 by root, Thu Nov 5 15:43:21 2009 UTC vs.
Revision 1.295 by root, Fri Nov 6 13:03:34 2009 UTC

52 0, 52 0,
53 -1, -1, 0, 1, 1, 1, 0, -1, 53 -1, -1, 0, 1, 1, 1, 0, -1,
54 -2, -2, -2, -1, 0, 1, 2, 2, 2, 2, 2, 1, 0, -1, -2, -2, 54 -2, -2, -2, -1, 0, 1, 2, 2, 2, 2, 2, 1, 0, -1, -2, -2,
55 -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3 55 -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3
56}; 56};
57int maxfree[SIZEOFFREE] = {
58 0,
59 9, 10, 13, 14, 17, 18, 21, 22,
60 25, 26, 27, 30, 31, 32, 33, 36, 37, 39, 39, 42, 43, 44, 45, 48,
61 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49
62};
63int freedir[SIZEOFFREE] = { 57int freedir[SIZEOFFREE] = {
64 0, 58 0,
65 1, 2, 3, 4, 5, 6, 7, 8, 59 1, 2, 3, 4, 5, 6, 7, 8,
66 1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8, 60 1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8,
67 1, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8 61 1, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8
62};
63
64static int maxfree[SIZEOFFREE] = {
65 0,
66 9, 10, 13, 14, 17, 18, 21, 22,
67 25, 26, 27, 30, 31, 32, 33, 36, 37, 39, 39, 42, 43, 44, 45, 48,
68 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49
68}; 69};
69 70
70static void 71static void
71write_uuid (uval64 skip, bool sync) 72write_uuid (uval64 skip, bool sync)
72{ 73{
445/* 446/*
446 * get_nearest_part(multi-object, object 2) returns the part of the 447 * get_nearest_part(multi-object, object 2) returns the part of the
447 * multi-object 1 which is closest to the second object. 448 * multi-object 1 which is closest to the second object.
448 * If it's not a multi-object, it is returned. 449 * If it's not a multi-object, it is returned.
449 */ 450 */
450object * 451static object *
451get_nearest_part (object *op, const object *pl) 452get_nearest_part (object *op, const object *pl)
452{ 453{
453 object *tmp, *closest; 454 object *tmp, *closest;
454 int last_dist, i; 455 int last_dist, i;
455 456
2173 * This basically means that if direction is 15, then it could either go 2174 * This basically means that if direction is 15, then it could either go
2174 * direction 4, 14, or 16 to get back to where we are. 2175 * direction 4, 14, or 16 to get back to where we are.
2175 * Moved from spell_util.c to object.c with the other related direction 2176 * Moved from spell_util.c to object.c with the other related direction
2176 * functions. 2177 * functions.
2177 */ 2178 */
2178const int reduction_dir[SIZEOFFREE][3] = { 2179static const int reduction_dir[SIZEOFFREE][3] = {
2179 {0, 0, 0}, /* 0 */ 2180 {0, 0, 0}, /* 0 */
2180 {0, 0, 0}, /* 1 */ 2181 {0, 0, 0}, /* 1 */
2181 {0, 0, 0}, /* 2 */ 2182 {0, 0, 0}, /* 2 */
2182 {0, 0, 0}, /* 3 */ 2183 {0, 0, 0}, /* 3 */
2183 {0, 0, 0}, /* 4 */ 2184 {0, 0, 0}, /* 4 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines