BGE fix: keep reference count consist on source object when replicating property copy actuator
This commit is contained in:
		@@ -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();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -77,6 +77,8 @@ public:
 | 
			
		||||
	GetReplica(
 | 
			
		||||
	);
 | 
			
		||||
 | 
			
		||||
	void ProcessReplica();
 | 
			
		||||
 | 
			
		||||
	virtual bool 
 | 
			
		||||
	Update();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user