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.182 by root, Mon Aug 20 18:11:02 2007 UTC vs.
Revision 1.183 by root, Mon Aug 20 19:13:10 2007 UTC

429} 429}
430 430
431/* 431/*
432 * Sets the owner and sets the skill and exp pointers to owner's current 432 * Sets the owner and sets the skill and exp pointers to owner's current
433 * skill and experience objects. 433 * skill and experience objects.
434 * ACTUALLY NO! investigate! TODO
434 */ 435 */
435void 436void
436object::set_owner (object *owner) 437object::set_owner (object *owner)
437{ 438{
439 // allow objects which own objects
438 if (!owner) 440 if (owner)
439 return;
440
441 /* next line added to allow objects which own objects */
442 /* Add a check for ownercounts in here, as I got into an endless loop
443 * with the fireball owning a poison cloud which then owned the
444 * fireball. I believe that was caused by one of the objects getting
445 * freed and then another object replacing it. Since the ownercounts
446 * didn't match, this check is valid and I believe that cause is valid.
447 */
448 while (owner->owner) 441 while (owner->owner)
449 owner = owner->owner; 442 owner = owner->owner;
450 443
451 this->owner = owner; 444 this->owner = owner;
452} 445}
453 446
454int 447int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines