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.138 by root, Sat Apr 21 16:56:29 2007 UTC vs.
Revision 1.141 by root, Sun Apr 29 21:44:34 2007 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * CrossFire, A Multiplayer game
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5 * Copyright (C) 2001 Mark Wedel & Crossfire Development Team 5 * Copyright (C) 2001 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (C) 1992 Frank Tore Johansen
7 * 7 *
313 313
314 /* Everything passes, must be OK. */ 314 /* Everything passes, must be OK. */
315 return 1; 315 return 1;
316} 316}
317 317
318void
319player::set_range (rangetype r)
320{
321 shoottype = r;
322}
323
318/* 324/*
319 * sum_weight() is a recursive function which calculates the weight 325 * sum_weight() is a recursive function which calculates the weight
320 * an object is carrying. It goes through in figures out how much 326 * an object is carrying. It goes through in figures out how much
321 * containers are carrying, and sums it up. 327 * containers are carrying, and sums it up.
322 */ 328 */
835 841
836 if (flag [FLAG_IS_LINKED]) 842 if (flag [FLAG_IS_LINKED])
837 remove_button_link (this); 843 remove_button_link (this);
838 844
839 if (flag [FLAG_FRIENDLY]) 845 if (flag [FLAG_FRIENDLY])
840 {
841 remove_friendly_object (this); 846 remove_friendly_object (this);
842
843 if (type == GOLEM
844 && owner
845 && owner->type == PLAYER
846 && owner->contr->ranges[range_golem] == this)
847 owner->contr->ranges[range_golem] = 0;
848 }
849 847
850 if (!flag [FLAG_REMOVED]) 848 if (!flag [FLAG_REMOVED])
851 remove (); 849 remove ();
852 850
853 destroy_inv (true); 851 destroy_inv (true);
1180 1178
1181 object *tmp, *top, *floor = NULL; 1179 object *tmp, *top, *floor = NULL;
1182 1180
1183 op->remove (); 1181 op->remove ();
1184 1182
1183#if 0
1185 if (!m->active != !op->active) 1184 if (!m->active != !op->active)
1186 if (m->active) 1185 if (m->active)
1187 op->activate_recursive (); 1186 op->activate_recursive ();
1188 else 1187 else
1189 op->deactivate_recursive (); 1188 op->deactivate_recursive ();
1189#endif
1190 1190
1191 if (out_of_map (m, op->x, op->y)) 1191 if (out_of_map (m, op->x, op->y))
1192 { 1192 {
1193 LOG (llevError, "Trying to insert object outside the map.\n%s\n", op->debug_desc ()); 1193 LOG (llevError, "Trying to insert object outside the map.\n%s\n", op->debug_desc ());
1194#ifdef MANY_CORES 1194#ifdef MANY_CORES

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines