BGE: some more cleanup, remove useless ReplicaSetName(), move code to ProcessReplica.

This commit is contained in:
2009-04-22 16:58:04 +00:00
parent 076d1910f5
commit f6d27e73ee
12 changed files with 4 additions and 47 deletions

View File

@@ -524,8 +524,6 @@ void CValue::ProcessReplica() /* was AddDataToReplica in 2.48 */
m_ValFlags.RefCountDisabled = false;
ReplicaSetName(GetName());
/* copy all props */
if (m_pNamedPropertyArray)
{

View File

@@ -294,7 +294,6 @@ public:
virtual STR_String GetName() = 0; // Retrieve the name of the value
virtual void SetName(STR_String name) = 0; // Set the name of the value
virtual void ReplicaSetName(STR_String name) = 0;
/** Sets the value to this cvalue.
* @attention this particular function should never be called. Why not abstract? */
virtual void SetValue(CValue* newval);
@@ -410,10 +409,10 @@ public:
if (name.Length())
m_pstrNewName = new STR_String(name);
}
virtual void ReplicaSetName(STR_String name) {
m_pstrNewName=NULL;
if (name.Length())
m_pstrNewName = new STR_String(name);
virtual void ProcessReplica() {
CValue::ProcessReplica();
if (m_pstrNewName)
m_pstrNewName = new STR_String(*m_pstrNewName);
}
virtual STR_String GetName() {

View File

@@ -143,14 +143,6 @@ void SCA_ILogicBrick::SetName(STR_String name)
}
void SCA_ILogicBrick::ReplicaSetName(STR_String name)
{
m_name = name;
}
bool SCA_ILogicBrick::IsActive()
{
return m_bActive;

View File

@@ -72,7 +72,6 @@ public:
virtual double GetNumber();
virtual STR_String GetName();
virtual void SetName(STR_String name);
virtual void ReplicaSetName(STR_String name);
bool IsActive();
void SetActive(bool active) ;

View File

@@ -199,26 +199,11 @@ void KX_GameObject::SetName(STR_String name)
m_name = name;
}; // Set the name of the value
void KX_GameObject::ReplicaSetName(STR_String name)
{
}
KX_IPhysicsController* KX_GameObject::GetPhysicsController()
{
return m_pPhysicsController1;
}
KX_GameObject* KX_GameObject::GetParent()
{
KX_GameObject* result = NULL;

View File

@@ -257,14 +257,6 @@ public:
STR_String name
);
/**
* Inherited from CValue -- does nothing.
*/
void
ReplicaSetName(
STR_String name
);
/**
* Inherited from CValue -- return a new copy of this
* instance allocated on the heap. Ownership of the new

View File

@@ -138,7 +138,6 @@ double KX_MeshProxy::GetNumber() { return -1;}
STR_String KX_MeshProxy::GetName() { return m_meshobj->GetName();}
void KX_MeshProxy::SetName(STR_String name) { };
CValue* KX_MeshProxy::GetReplica() { return NULL;}
void KX_MeshProxy::ReplicaSetName(STR_String name) {};
// stuff for python integration

View File

@@ -53,7 +53,6 @@ public:
virtual RAS_MeshObject* GetMesh() { return m_meshobj; }
virtual STR_String GetName();
virtual void SetName(STR_String name); // Set the name of the value
virtual void ReplicaSetName(STR_String name);
virtual CValue* GetReplica();
// stuff for python integration

View File

@@ -183,8 +183,6 @@ double KX_PolyProxy::GetNumber() { return -1;}
STR_String KX_PolyProxy::GetName() { return sPolyName;}
void KX_PolyProxy::SetName(STR_String) { };
CValue* KX_PolyProxy::GetReplica() { return NULL;}
void KX_PolyProxy::ReplicaSetName(STR_String) {};
// stuff for python integration

View File

@@ -48,7 +48,6 @@ public:
double GetNumber();
STR_String GetName();
void SetName(STR_String name); // Set the name of the value
void ReplicaSetName(STR_String name);
CValue* GetReplica();

View File

@@ -340,8 +340,6 @@ double KX_VertexProxy::GetNumber() { return -1;}
STR_String KX_VertexProxy::GetName() { return sVertexName;}
void KX_VertexProxy::SetName(STR_String) { };
CValue* KX_VertexProxy::GetReplica() { return NULL;}
void KX_VertexProxy::ReplicaSetName(STR_String) {};
// stuff for python integration

View File

@@ -49,7 +49,6 @@ public:
double GetNumber();
STR_String GetName();
void SetName(STR_String name); // Set the name of the value
void ReplicaSetName(STR_String name);
CValue* GetReplica();