1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

More panic link fixes. (Cherry picked from e733ca824b)

Author: Adam Johnson
Date:   Fri Feb 10 12:45:14 2012 -0500

    More panic link fixes

    Now, we check the armature mod to see if we're REALLY linked in (the screen
    is not black). That way, we can be sure all delayed transforms and false
    hits (like how we initially spawn into the AhnySphere04 panic region) don't
    panic link us.
This commit is contained in:
2020-04-12 14:44:30 -06:00
committed by rarified
parent 9e1d8446ca
commit 906cebbd25
4 changed files with 30 additions and 15 deletions

View File

@ -676,9 +676,8 @@ void plSubworldRegionDetector::Write(hsStream* stream, hsResMgr* mgr)
///////////////////////////////////
hsBool plPanicLinkRegion::MsgReceive(plMessage* msg)
{
plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg);
if (pCollMsg)
if (plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg))
{
if (plNetClientApp::GetInstance()->GetLocalPlayerKey() != pCollMsg->fOtherKey)
return true;
@ -688,13 +687,17 @@ hsBool plPanicLinkRegion::MsgReceive(plMessage* msg)
plArmatureMod* avMod = IGetAvatarModifier(pCollMsg->fOtherKey);
if (avMod)
{
hsPoint3 pos;
if (avMod->GetController())
{
avMod->GetController()->GetPositionSim(pos);
DetectorLogSpecial("Avatar is panic linking. Position %f,%f,%f and is %s", pos.fX, pos.fY, pos.fZ, avMod->GetController()->IsEnabled() ? "enabled" : "disabled");
}
avMod->PanicLink(fPlayLinkOutAnim);
if (avMod->IsLinkedIn())
{
hsPoint3 kinPos;
if (avMod->GetController())
{
avMod->GetController()->GetPositionSim(kinPos);
DetectorLogSpecial("Avatar is panic linking. KinPos at %f,%f,%f and is %s", kinPos.fX, pos.fY, pos.fZ, avMod->GetController()->IsEnabled() ? "enabled" : "disabled");
}
avMod->PanicLink(fPlayLinkOutAnim);
} else
DetectorLogRed("PANIC LINK %s before we actually linked in!", GetKey()->GetName());
}
}

View File

@ -232,8 +232,7 @@ class plPanicLinkRegion : public plCollisionDetector
public:
hsBool fPlayLinkOutAnim;
plPanicLinkRegion() : fPlayLinkOutAnim(true) {;}
~plPanicLinkRegion(){;}
plPanicLinkRegion() : fPlayLinkOutAnim(true) { }
virtual hsBool MsgReceive(plMessage* msg);