From 5553d2c0142539c754575ce471c2676e0d5dff34 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 22 Apr 2009 14:42:00 +0000 Subject: 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. --- source/gameengine/Ketsji/KX_Light.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'source/gameengine/Ketsji/KX_Light.cpp') diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index a426953602b..7bc982111fe 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -82,9 +82,6 @@ CValue* KX_LightObject::GetReplica() KX_LightObject* replica = new KX_LightObject(*this); - // this will copy properties and so on... - CValue::AddDataToReplica(replica); - replica->ProcessReplica(); replica->m_lightobj.m_worldmatrix = replica->GetOpenGLMatrixPtr(); -- cgit v1.2.3