@ -73,9 +73,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
plArmatureMod * plCollisionDetector : : IGetAvatarModifier ( plKey key )
plArmatureMod * plCollisionDetector : : IGetAvatarModifier ( plKey key )
{
{
if ( ! key )
return nil ;
plSceneObject * avObj = plSceneObject : : ConvertNoRef ( key - > ObjectIsLoaded ( ) ) ;
plSceneObject * avObj = plSceneObject : : ConvertNoRef ( key - > ObjectIsLoaded ( ) ) ;
if ( avObj )
if ( avObj )
{
{
@ -245,6 +242,8 @@ plCameraRegionDetector::~plCameraRegionDetector()
void plCameraRegionDetector : : ITrigger ( plKey hitter , bool entering , bool immediate )
void plCameraRegionDetector : : ITrigger ( plKey hitter , bool entering , bool immediate )
{
{
if ( fSavingSendMsg )
DetectorLogRed ( " %s: Stale messages on ITrigger. This should never happen! " , GetKeyName ( ) . c_str ( ) ) ;
if ( fIsInside & & entering )
if ( fIsInside & & entering )
DetectorLogRed ( " %s: Duplicate enter! Did we miss an exit? " , GetKeyName ( ) . c_str ( ) ) ;
DetectorLogRed ( " %s: Duplicate enter! Did we miss an exit? " , GetKeyName ( ) . c_str ( ) ) ;
else if ( ! fIsInside & & ! entering )
else if ( ! fIsInside & & ! entering )
@ -385,18 +384,11 @@ hsBool plObjectInVolumeDetector::MsgReceive(plMessage* msg)
plCollideMsg * pCollMsg = plCollideMsg : : ConvertNoRef ( msg ) ;
plCollideMsg * pCollMsg = plCollideMsg : : ConvertNoRef ( msg ) ;
if ( pCollMsg )
if ( pCollMsg )
{
{
fLastHitter = pCollMsg - > fOtherKey ;
// If the avatar is disabled (flying around), don't trigger
// If the avatar is disabled (flying around), don't trigger
if ( IIsDisabledAvatar ( fLastHitter ) )
if ( IIsDisabledAvatar ( pCollMsg - > fOtherKey ) )
return false ;
return false ;
ITrigger ( fLastHitter , ( pCollMsg - > fEntering ! = 0 ) ) ;
ITrigger ( pCollMsg - > fOtherKey , ( pCollMsg - > fEntering ! = 0 ) ) ;
// If we never eval before the exit...
if ( fWaitingForEval )
plgDispatch : : Dispatch ( ) - > UnRegisterForExactType ( plEvalMsg : : Index ( ) , GetKey ( ) ) ;
else
plgDispatch : : Dispatch ( ) - > RegisterForExactType ( plEvalMsg : : Index ( ) , GetKey ( ) ) ;
plgDispatch : : Dispatch ( ) - > RegisterForExactType ( plEvalMsg : : Index ( ) , GetKey ( ) ) ;
fWaitingForEval = ! fWaitingForEval ;
return true ;
return true ;
}
}
@ -404,13 +396,8 @@ hsBool plObjectInVolumeDetector::MsgReceive(plMessage* msg)
if ( pEvalMsg )
if ( pEvalMsg )
{
{
fNumEvals + + ;
fNumEvals + + ;
// Don't dispatch if we're not in the age
if ( plArmatureMod * av = IGetAvatarModifier ( fLastHitter ) )
if ( av - > IsMidLink ( ) )
return true ;
ISendSavedTriggerMsgs ( ) ;
ISendSavedTriggerMsgs ( ) ;
plgDispatch : : Dispatch ( ) - > UnRegisterForExactType ( plEvalMsg : : Index ( ) , GetKey ( ) ) ;
plgDispatch : : Dispatch ( ) - > UnRegisterForExactType ( plEvalMsg : : Index ( ) , GetKey ( ) ) ;
fWaitingForEval = false ;
}
}
plPlayerPageMsg * pageMsg = plPlayerPageMsg : : ConvertNoRef ( msg ) ;
plPlayerPageMsg * pageMsg = plPlayerPageMsg : : ConvertNoRef ( msg ) ;