--
[ Picked text/plain from multipart/alternative ]
The subject of your message gave me a good laugh, and upon reading the
message I laughed even harder when I read ".. caused the player to touch
itself."

Thanks,

Paul

On 10/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> I noticed in my mod, due to some asserts I had added, that under certain
> circumstances I don't fully understand, the vphysics engine would report a
> child object (ie, a weapon) touching a player, which when caused the player
> to touch itself.  I don't think Valve could've really intended this - anyone
> have any ideas on why it might ever have been a good thing to do?  Here's
> the fix if not...
>
> --- mod/src/dlls/baseentity.cpp 26 Aug 2006 21:24:28 -0000      1.8
> +++ mod/src/dlls/baseentity.cpp 7 Oct 2006 18:00:57 -0000
> @@ -1787,8 +1787,9 @@
> void CBaseEntity::StartTouch( CBaseEntity *pOther )
> {
>         // notify parent
> -       if ( m_pParent != NULL )
> +       if ((m_pParent != NULL) && (m_pParent != pOther)) {
>                 m_pParent->StartTouch( pOther );
> +    }
> }
>
> void CBaseEntity::Touch( CBaseEntity *pOther )
> @@ -1797,15 +1798,15 @@
>                 (this->*m_pfnTouch)( pOther );
>
>         // notify parent of touch
> -       if ( m_pParent != NULL )
> +    if ((m_pParent != NULL) && (m_pParent != pOther)) {
>                 m_pParent->Touch( pOther );
> +    }
> }
>
> void CBaseEntity::EndTouch( CBaseEntity *pOther )
> {
>         // notify parent
> -       if ( m_pParent != NULL )
> -       {
> +       if ((m_pParent != NULL) && (m_pParent != pOther)) {
>                 m_pParent->EndTouch( pOther );
>         }
> }
> @@ -1825,8 +1826,7 @@
>         //
>         // Forward the blocked event to our parent, if any.
>         //
> -       if ( m_pParent != NULL )
> -       {
> +       if ((m_pParent != NULL) && (m_pParent != pOther)) {
>                 m_pParent->Blocked( pOther );
>         }
> }
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to