BGE fix: keep reference count consist on source object when replicating property copy actuator

This commit is contained in:
2008-04-14 22:45:28 +00:00
parent 815791920f
commit 6bb327badc
2 changed files with 10 additions and 0 deletions

View File

@@ -183,6 +183,14 @@ GetReplica() {
};
void SCA_PropertyActuator::ProcessReplica()
{
// no need to check for self reference like in the constructor:
// the replica will always have a different parent
if (m_sourceObj)
m_sourceObj->AddRef();
SCA_IActuator::ProcessReplica();
}

View File

@@ -77,6 +77,8 @@ public:
GetReplica(
);
void ProcessReplica();
virtual bool
Update();