Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/BaseObject.cc

    r9667 r10624  
    6363        this->bActive_ = true;
    6464        this->bVisible_ = true;
    65         this->oldGametype_ = 0;
    6665        this->bRegisteredEventStates_ = false;
    6766
     
    7877        {
    7978            this->setFile(this->creator_->getFile());
    80             this->setNamespace(this->creator_->getNamespace());
    81             this->setScene(this->creator_->getScene(), this->creator_->getSceneID());
    82             this->setGametype(this->creator_->getGametype());
    83             this->setLevel(this->creator_->getLevel());
     79
     80            // store strong-pointers on all four base objects by default (can be overwritten with weak-ptr after the constructor if necessary)
     81            this->setNamespace(this->creator_->namespace_.createStrongPtr());
     82            this->setScene    (this->creator_->scene_    .createStrongPtr(), this->creator_->sceneID_);
     83            this->setGametype (this->creator_->gametype_ .createStrongPtr());
     84            this->setLevel    (this->creator_->level_    .createStrongPtr());
    8485        }
    8586        else
    8687        {
    8788            this->file_ = 0;
    88             this->namespace_ = 0;
    89             this->scene_ = 0;
    9089            this->sceneID_ = OBJECTID_UNKNOWN;
    91             this->gametype_ = 0;
    92             this->level_ = 0;
    9390        }
    9491    }
Note: See TracChangeset for help on using the changeset viewer.