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.18 by root, Fri Sep 8 16:51:42 2006 UTC vs.
Revision 1.19 by root, Fri Sep 8 17:14:07 2006 UTC

1/* 1/*
2 * static char *rcsid_object_c = 2 * static char *rcsid_object_c =
3 * "$Id: object.C,v 1.18 2006/09/08 16:51:42 root Exp $"; 3 * "$Id: object.C,v 1.19 2006/09/08 17:14:07 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
623 } 623 }
624 624
625 update_ob_speed (op); 625 update_ob_speed (op);
626} 626}
627 627
628/*
629 * get_object() grabs an object from the list of unused objects, makes
630 * sure it is initialised, and returns it.
631 * If there are no free objects, expand_objects() is called to get more.
632 */
633
634object *get_object () 628object::object ()
635{ 629{
636 object *op = new object;
637
638 op->count = ++ob_count; 630 count = ++ob_count;
639 631
640 op->next = objects; 632 next = objects;
641 633
642 if (objects) 634 if (objects)
643 objects->prev = op; 635 objects->prev = this;
644 636
645 objects = op; 637 objects = this;
646 638
647 SET_FLAG (op, FLAG_REMOVED); 639 SET_FLAG (this, FLAG_REMOVED);
648 640
649 op->expmul = 1.0; 641 expmul = 1.0;
650 op->face = blank_face; 642 face = blank_face;
651 op->attacked_by_count = -1; 643 attacked_by_count = -1;
644}
652 645
653 return op; 646object::~object ()
647{
654} 648}
655 649
656/* 650/*
657 * If an object with the IS_TURNABLE() flag needs to be turned due 651 * If an object with the IS_TURNABLE() flag needs to be turned due
658 * to the closest player being on the other side, this function can 652 * to the closest player being on the other side, this function can

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines