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.171 by root, Sun Nov 8 16:13:45 2009 UTC vs.
Revision 1.172 by root, Sun Nov 8 20:55:39 2009 UTC

449 */ 449 */
450 width = 16; 450 width = 16;
451 height = 16; 451 height = 16;
452 timeout = 300; 452 timeout = 300;
453 max_nrof = 1000; // 1000 items of anything 453 max_nrof = 1000; // 1000 items of anything
454 max_items = 25; 454 max_items = MAX_ITEM_PER_ACTION;
455 max_volume = 2000000; // 2m³ 455 max_volume = 2000000; // 2m³
456} 456}
457 457
458maptile::maptile (int w, int h) 458maptile::maptile (int w, int h)
459{ 459{
1032 object *last = 0; 1032 object *last = 0;
1033 uint8 flags = P_UPTODATE; 1033 uint8 flags = P_UPTODATE;
1034 sint8 light = 0; 1034 sint8 light = 0;
1035 MoveType move_block = 0, move_slow = 0, move_on = 0, move_off = 0, move_allow = 0; 1035 MoveType move_block = 0, move_slow = 0, move_on = 0, move_off = 0, move_allow = 0;
1036 uint64_t volume = 0; 1036 uint64_t volume = 0;
1037 uint32_t nrof = 0; 1037 uint32_t items = 0;
1038 object *anywhere = 0; 1038 object *anywhere = 0;
1039 1039
1040 //object *middle = 0; 1040 //object *middle = 0;
1041 //object *top = 0; 1041 //object *top = 0;
1042 //object *floor = 0; 1042 //object *floor = 0;
1073 */ 1073 */
1074 middle = 0; 1074 middle = 0;
1075 top = 0; 1075 top = 0;
1076 floor = tmp; 1076 floor = tmp;
1077 volume = 0; 1077 volume = 0;
1078 nrof = 0; 1078 items = 0;
1079 } 1079 }
1080 else 1080 else
1081 { 1081 {
1082 if (expect_true (!tmp->flag [FLAG_NO_PICK])) 1082 if (expect_true (!tmp->flag [FLAG_NO_PICK]))
1083 { 1083 {
1084 ++nrof; 1084 ++items;
1085 volume += tmp->volume (); 1085 volume += tmp->volume ();
1086 } 1086 }
1087 1087
1088 /* Flag anywhere have high priority */ 1088 /* Flag anywhere have high priority */
1089 if (expect_false (tmp->flag [FLAG_SEE_ANYWHERE])) 1089 if (expect_false (tmp->flag [FLAG_SEE_ANYWHERE]))
1124 this->flags_ = flags; 1124 this->flags_ = flags;
1125 this->move_block = move_block & ~move_allow; 1125 this->move_block = move_block & ~move_allow;
1126 this->move_on = move_on; 1126 this->move_on = move_on;
1127 this->move_off = move_off; 1127 this->move_off = move_off;
1128 this->move_slow = move_slow; 1128 this->move_slow = move_slow;
1129 this->volume_ = volume / 1024; 1129 this->volume_ = (volume + 1023) / 1024;
1130 this->nrof_ = upos_min (nrof, 65535); // assume nrof <= 2**31 1130 this->items_ = upos_min (items, 65535); // assume nrof <= 2**31
1131 1131
1132 /* At this point, we have a floor face (if there is a floor), 1132 /* At this point, we have a floor face (if there is a floor),
1133 * and the floor is set - we are not going to touch it at 1133 * and the floor is set - we are not going to touch it at
1134 * this point. 1134 * this point.
1135 * middle contains the highest visibility face. 1135 * middle contains the highest visibility face.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines