diff --git a/stepmania/src/AutoActor.cpp b/stepmania/src/AutoActor.cpp index 500f28b45e..f1a0946023 100644 --- a/stepmania/src/AutoActor.cpp +++ b/stepmania/src/AutoActor.cpp @@ -10,6 +10,23 @@ void AutoActor::Unload() m_pActor=NULL; } +AutoActor::AutoActor( const AutoActor &cpy ) +{ + if( cpy.m_pActor == NULL ) + m_pActor = NULL; + else + m_pActor = cpy.m_pActor->Copy(); +} + +AutoActor &AutoActor::operator=( const AutoActor &cpy ) +{ + if( cpy.m_pActor == NULL ) + m_pActor = NULL; + else + m_pActor = cpy.m_pActor->Copy(); + return *this; +} + void AutoActor::Load( const CString &sPath ) { Unload(); diff --git a/stepmania/src/AutoActor.h b/stepmania/src/AutoActor.h index 3ad868b2ce..a68c952f09 100644 --- a/stepmania/src/AutoActor.h +++ b/stepmania/src/AutoActor.h @@ -13,6 +13,8 @@ class AutoActor public: AutoActor() { m_pActor = NULL; } ~AutoActor() { Unload(); } + AutoActor( const AutoActor &cpy ); + AutoActor &operator =( const AutoActor &cpy ); operator const Actor* () const { return m_pActor; } operator Actor* () { return m_pActor; } const Actor *operator->() const { return m_pActor; }