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.235 by root, Tue May 6 20:00:12 2008 UTC vs.
Revision 1.236 by root, Tue May 6 20:08:37 2008 UTC

1057 esrv_del_item (pl->contr, count); 1057 esrv_del_item (pl->contr, count);
1058 flag [FLAG_REMOVED] = true; // hack around the issue of visible_to checking flag_removed 1058 flag [FLAG_REMOVED] = true; // hack around the issue of visible_to checking flag_removed
1059 1059
1060 adjust_weight (env, -total_weight ()); 1060 adjust_weight (env, -total_weight ());
1061 1061
1062 // make sure cmov optimisation is applicable
1062 *(above ? &above->below : &env->inv) = below; 1063 *(above ? &above->below : &env->inv) = below;
1064 *(below ? &below->above : &above ) = above; // &above is just a dummy
1063 1065
1064 if (below) 1066 above = 0;
1065 below->above = above; 1067 below = 0;
1068 env = 0;
1066 1069
1067 /* we set up values so that it could be inserted into 1070 /* we set up values so that it could be inserted into
1068 * the map, but we don't actually do that - it is up 1071 * the map, but we don't actually do that - it is up
1069 * to the caller to decide what we want to do. 1072 * to the caller to decide what we want to do.
1070 */ 1073 */
1071 map = env->map; 1074 map = env->map;
1072 x = env->x; 1075 x = env->x;
1073 y = env->y; 1076 y = env->y;
1074 above = 0;
1075 below = 0;
1076 env = 0;
1077 1077
1078 /* NO_FIX_PLAYER is set when a great many changes are being 1078 /* NO_FIX_PLAYER is set when a great many changes are being
1079 * made to players inventory. If set, avoiding the call 1079 * made to players inventory. If set, avoiding the call
1080 * to save cpu time. 1080 * to save cpu time.
1081 */ 1081 */
1108 1108
1109 esrv_del_item (pl->contr, count); 1109 esrv_del_item (pl->contr, count);
1110 } 1110 }
1111 1111
1112 /* link the object above us */ 1112 /* link the object above us */
1113 if (above) 1113 // re-link, make sure compiler can easily use cmove
1114 above->below = below; 1114 *(above ? &above->below : &ms.top) = below;
1115 else 1115 *(below ? &below->above : &ms.bot) = above;
1116 ms.top = below; /* we were top, set new top */
1117
1118 /* Relink the object below us, if there is one */
1119 if (below)
1120 below->above = above;
1121 else
1122 ms.bot = above;
1123 1116
1124 above = 0; 1117 above = 0;
1125 below = 0; 1118 below = 0;
1126 1119
1127 if (map->in_memory == MAP_SAVING) 1120 if (map->in_memory == MAP_SAVING)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines