diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-22 18:42:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-22 18:42:00 +0400 |
commit | 5553d2c0142539c754575ce471c2676e0d5dff34 (patch) | |
tree | 7842bd82afbc5cf797594dbee03fb881039e37b9 /source/gameengine/Expressions/FloatValue.cpp | |
parent | a8592d09d0173bab0e3eb66a315146e164cf14a4 (diff) |
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.
Diffstat (limited to 'source/gameengine/Expressions/FloatValue.cpp')
-rw-r--r-- | source/gameengine/Expressions/FloatValue.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Expressions/FloatValue.cpp b/source/gameengine/Expressions/FloatValue.cpp index 212a55fe457..a31d3b9a528 100644 --- a/source/gameengine/Expressions/FloatValue.cpp +++ b/source/gameengine/Expressions/FloatValue.cpp @@ -307,8 +307,8 @@ const STR_String & CFloatValue::GetText() CValue* CFloatValue::GetReplica() { CFloatValue* replica = new CFloatValue(*this); - replica->m_pstrRep = NULL; - CValue::AddDataToReplica(replica); + replica->m_pstrRep = NULL; /* should be in CFloatValue::ProcessReplica() but its not defined, no matter */ + replica->ProcessReplica(); return replica; } |