mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-19 11:49:09 +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:
@ -649,6 +649,7 @@ void plArmatureMod::IInitDefaults()
|
|||||||
fStealthLevel = 0;
|
fStealthLevel = 0;
|
||||||
fMouseFrameTurnStrength = 0.f;
|
fMouseFrameTurnStrength = 0.f;
|
||||||
fSuspendInputCount = 0;
|
fSuspendInputCount = 0;
|
||||||
|
fIsLinkedIn = false;
|
||||||
fMidLink = false;
|
fMidLink = false;
|
||||||
fAlreadyPanicLinking = false;
|
fAlreadyPanicLinking = false;
|
||||||
fReverseFBOnIdle = false;
|
fReverseFBOnIdle = false;
|
||||||
@ -1374,16 +1375,21 @@ hsBool plArmatureMod::MsgReceive(plMessage* msg)
|
|||||||
plLinkInDoneMsg *doneMsg = plLinkInDoneMsg::ConvertNoRef(msg);
|
plLinkInDoneMsg *doneMsg = plLinkInDoneMsg::ConvertNoRef(msg);
|
||||||
if (doneMsg)
|
if (doneMsg)
|
||||||
{
|
{
|
||||||
|
fIsLinkedIn = true;
|
||||||
IFireBehaviorNotify(plHBehavior::kBehaviorTypeLinkIn, false);
|
IFireBehaviorNotify(plHBehavior::kBehaviorTypeLinkIn, false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
plAgeLoadedMsg *ageLoadMsg = plAgeLoadedMsg::ConvertNoRef(msg);
|
plAgeLoadedMsg *ageLoadMsg = plAgeLoadedMsg::ConvertNoRef(msg);
|
||||||
if (ageLoadMsg && ageLoadMsg->fLoaded)
|
if (ageLoadMsg)
|
||||||
{
|
{
|
||||||
// only the local player gets these
|
if (ageLoadMsg->fLoaded)
|
||||||
NetworkSynch(hsTimer::GetSysSeconds(), true);
|
{
|
||||||
EnablePhysics(true);
|
// only the local player gets these
|
||||||
|
NetworkSynch(hsTimer::GetSysSeconds(), true);
|
||||||
|
EnablePhysics(true);
|
||||||
|
} else
|
||||||
|
fIsLinkedIn = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2517,6 +2523,11 @@ bool plArmatureMod::IsMidLink()
|
|||||||
return fMidLink;
|
return fMidLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool plArmatureMod::IsLinkedIn()
|
||||||
|
{
|
||||||
|
return fIsLinkedIn;
|
||||||
|
}
|
||||||
|
|
||||||
hsBool plArmatureMod::ConsumeJump()
|
hsBool plArmatureMod::ConsumeJump()
|
||||||
{
|
{
|
||||||
if (!GetInputFlag(B_CONTROL_CONSUMABLE_JUMP))
|
if (!GetInputFlag(B_CONTROL_CONSUMABLE_JUMP))
|
||||||
|
@ -318,6 +318,7 @@ public:
|
|||||||
int GetStealthLevel() const { return fStealthLevel; }
|
int GetStealthLevel() const { return fStealthLevel; }
|
||||||
|
|
||||||
bool IsOpaque();
|
bool IsOpaque();
|
||||||
|
bool IsLinkedIn();
|
||||||
bool IsMidLink();
|
bool IsMidLink();
|
||||||
hsBool ConsumeJump(); // returns true if the jump keypress was available to consume
|
hsBool ConsumeJump(); // returns true if the jump keypress was available to consume
|
||||||
|
|
||||||
@ -401,6 +402,7 @@ protected:
|
|||||||
plArmatureUpdateMsg *fUpdateMsg;
|
plArmatureUpdateMsg *fUpdateMsg;
|
||||||
|
|
||||||
// Trying to be a good lad here and align all our bools and UInt8s...
|
// Trying to be a good lad here and align all our bools and UInt8s...
|
||||||
|
bool fIsLinkedIn; // We have finished playing the LinkEffects and are properly in the age
|
||||||
bool fMidLink; // We're in between a LeaveAge and an EnterAge
|
bool fMidLink; // We're in between a LeaveAge and an EnterAge
|
||||||
bool fAlreadyPanicLinking; // Cleared when you enter an age. Prevents spamming the server with panic link requests.
|
bool fAlreadyPanicLinking; // Cleared when you enter an age. Prevents spamming the server with panic link requests.
|
||||||
bool fUnconsumedJump; // We've pressed the jump key, but haven't jumped yet
|
bool fUnconsumedJump; // We've pressed the jump key, but haven't jumped yet
|
||||||
|
@ -676,9 +676,8 @@ void plSubworldRegionDetector::Write(hsStream* stream, hsResMgr* mgr)
|
|||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
hsBool plPanicLinkRegion::MsgReceive(plMessage* msg)
|
hsBool plPanicLinkRegion::MsgReceive(plMessage* msg)
|
||||||
{
|
{
|
||||||
plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg);
|
|
||||||
|
|
||||||
if (pCollMsg)
|
if (plCollideMsg* pCollMsg = plCollideMsg::ConvertNoRef(msg))
|
||||||
{
|
{
|
||||||
if (plNetClientApp::GetInstance()->GetLocalPlayerKey() != pCollMsg->fOtherKey)
|
if (plNetClientApp::GetInstance()->GetLocalPlayerKey() != pCollMsg->fOtherKey)
|
||||||
return true;
|
return true;
|
||||||
@ -688,13 +687,17 @@ hsBool plPanicLinkRegion::MsgReceive(plMessage* msg)
|
|||||||
plArmatureMod* avMod = IGetAvatarModifier(pCollMsg->fOtherKey);
|
plArmatureMod* avMod = IGetAvatarModifier(pCollMsg->fOtherKey);
|
||||||
if (avMod)
|
if (avMod)
|
||||||
{
|
{
|
||||||
hsPoint3 pos;
|
if (avMod->IsLinkedIn())
|
||||||
if (avMod->GetController())
|
{
|
||||||
{
|
hsPoint3 kinPos;
|
||||||
avMod->GetController()->GetPositionSim(pos);
|
if (avMod->GetController())
|
||||||
DetectorLogSpecial("Avatar is panic linking. Position %f,%f,%f and is %s", pos.fX, pos.fY, pos.fZ, avMod->GetController()->IsEnabled() ? "enabled" : "disabled");
|
{
|
||||||
}
|
avMod->GetController()->GetPositionSim(kinPos);
|
||||||
avMod->PanicLink(fPlayLinkOutAnim);
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,8 +232,7 @@ class plPanicLinkRegion : public plCollisionDetector
|
|||||||
public:
|
public:
|
||||||
hsBool fPlayLinkOutAnim;
|
hsBool fPlayLinkOutAnim;
|
||||||
|
|
||||||
plPanicLinkRegion() : fPlayLinkOutAnim(true) {;}
|
plPanicLinkRegion() : fPlayLinkOutAnim(true) { }
|
||||||
~plPanicLinkRegion(){;}
|
|
||||||
|
|
||||||
|
|
||||||
virtual hsBool MsgReceive(plMessage* msg);
|
virtual hsBool MsgReceive(plMessage* msg);
|
||||||
|
Reference in New Issue
Block a user