BGE C++ API
PyObjectPlus::ProcessReplica() is now called when any of its subclasses are replicated. This is important because PyObjectPlus::ProcessReplica() NULL's the 'm_proxy' python pointer I added recently. Without this a replicated subclass of PyObjectPlus could have an invalid pointer (crashing the BGE). This change also means CValue::AddDataToReplica() can be moved into CValue::ProcessReplica() since ProcessReplica is always called.
This commit is contained in:
@@ -110,7 +110,7 @@ CValue* SCA_PythonController::GetReplica()
|
||||
*/
|
||||
|
||||
// this will copy properties and so on...
|
||||
CValue::AddDataToReplica(replica);
|
||||
replica->ProcessReplica();
|
||||
|
||||
return replica;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user