diff --git a/game/shared/ehandle.h b/game/shared/ehandle.h index 26c2055c..7c8375dc 100644 --- a/game/shared/ehandle.h +++ b/game/shared/ehandle.h @@ -71,6 +71,7 @@ public: bool operator==( T *val ) const; bool operator!=( T *val ) const; const CBaseHandle& operator=( const T *val ); + const CBaseHandle& operator=( const CBaseHandle &val ); T* operator->() const; }; @@ -168,6 +169,13 @@ inline const CBaseHandle& CHandle::operator=( const T *val ) return *this; } +template +inline const CBaseHandle &CHandle::operator=( const CBaseHandle &val ) +{ + Init( val.GetEntryIndex(), val.GetSerialNumber() ); + return *this; +} + template T* CHandle::operator -> () const {