mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix the Relto panic link weird stuff
The ladder region fixes introduced the panic link. Now we should always verify the following when changing anything related to the stupid kinematic actor turd: - Linking to any Ahnoying Sphere's main LIP does not result in a panic link - The Teledahn hatch ladder camera works as expected - That the game doesn't crash on anything stupid, like a nil SceneNode
This commit is contained in:
@ -395,7 +395,10 @@ void plPXPhysicalControllerCore::IMatchKinematicToController()
|
|||||||
kinPos.z = (NxReal)cPos.z;
|
kinPos.z = (NxReal)cPos.z;
|
||||||
if (plSimulationMgr::fExtraProfile)
|
if (plSimulationMgr::fExtraProfile)
|
||||||
SimLog("Match setting kinematic from %f,%f,%f to %f,%f,%f",prevKinPos.x,prevKinPos.y,prevKinPos.z,kinPos.x,kinPos.y,kinPos.z );
|
SimLog("Match setting kinematic from %f,%f,%f to %f,%f,%f",prevKinPos.x,prevKinPos.y,prevKinPos.z,kinPos.x,kinPos.y,kinPos.z );
|
||||||
fKinematicActor->moveGlobalPosition(kinPos);
|
if (fBehavingLikeAnimatedPhys && fKinematic) // if NX_BF_KINEMATIC && (avatar is on a ladder or something)
|
||||||
|
fKinematicActor->moveGlobalPosition(kinPos);
|
||||||
|
else
|
||||||
|
fKinematicActor->setGlobalPosition(kinPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void plPXPhysicalControllerCore::UpdateControllerAndPhysicalRep()
|
void plPXPhysicalControllerCore::UpdateControllerAndPhysicalRep()
|
||||||
@ -406,7 +409,7 @@ void plPXPhysicalControllerCore::UpdateControllerAndPhysicalRep()
|
|||||||
{//this means we are moving the controller and then synchnig the kin
|
{//this means we are moving the controller and then synchnig the kin
|
||||||
NxExtendedVec3 ControllerPos= fController->getPosition();
|
NxExtendedVec3 ControllerPos= fController->getPosition();
|
||||||
NxVec3 NewKinPos((NxReal)ControllerPos.x, (NxReal)ControllerPos.y, (NxReal)ControllerPos.z);
|
NxVec3 NewKinPos((NxReal)ControllerPos.x, (NxReal)ControllerPos.y, (NxReal)ControllerPos.z);
|
||||||
if (fEnabled && fKinematicActor->readBodyFlag(NX_BF_KINEMATIC))
|
if (fEnabled || fKinematic)
|
||||||
{
|
{
|
||||||
if (plSimulationMgr::fExtraProfile)
|
if (plSimulationMgr::fExtraProfile)
|
||||||
SimLog("Moving kinematic to %f,%f,%f",NewKinPos.x, NewKinPos.y, NewKinPos.z );
|
SimLog("Moving kinematic to %f,%f,%f",NewKinPos.x, NewKinPos.y, NewKinPos.z );
|
||||||
@ -414,7 +417,7 @@ void plPXPhysicalControllerCore::UpdateControllerAndPhysicalRep()
|
|||||||
fKinematicActor->moveGlobalPosition(NewKinPos);
|
fKinematicActor->moveGlobalPosition(NewKinPos);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (fEnabled)
|
else
|
||||||
{
|
{
|
||||||
if (plSimulationMgr::fExtraProfile)
|
if (plSimulationMgr::fExtraProfile)
|
||||||
SimLog("Setting kinematic to %f,%f,%f", NewKinPos.x, NewKinPos.y, NewKinPos.z );
|
SimLog("Setting kinematic to %f,%f,%f", NewKinPos.x, NewKinPos.y, NewKinPos.z );
|
||||||
@ -446,14 +449,14 @@ void plPXPhysicalControllerCore::MoveKinematicToController(hsPoint3& pos)
|
|||||||
newPos.x = (NxReal)pos.fX;
|
newPos.x = (NxReal)pos.fX;
|
||||||
newPos.y = (NxReal)pos.fY;
|
newPos.y = (NxReal)pos.fY;
|
||||||
newPos.z = (NxReal)pos.fZ+kPhysZOffset;
|
newPos.z = (NxReal)pos.fZ+kPhysZOffset;
|
||||||
if (fEnabled && fKinematicActor->readBodyFlag(NX_BF_KINEMATIC))
|
if ((fEnabled || fKinematic) && fBehavingLikeAnimatedPhys)
|
||||||
{
|
{
|
||||||
if (plSimulationMgr::fExtraProfile)
|
if (plSimulationMgr::fExtraProfile)
|
||||||
SimLog("Moving kinematic from %f,%f,%f to %f,%f,%f",pos.fX,pos.fY,pos.fZ+kPhysZOffset,kinPos.x,kinPos.y,kinPos.z );
|
SimLog("Moving kinematic from %f,%f,%f to %f,%f,%f",pos.fX,pos.fY,pos.fZ+kPhysZOffset,kinPos.x,kinPos.y,kinPos.z );
|
||||||
// use the position
|
// use the position
|
||||||
fKinematicActor->moveGlobalPosition(newPos);
|
fKinematicActor->moveGlobalPosition(newPos);
|
||||||
}
|
}
|
||||||
else if (fEnabled)
|
else
|
||||||
{
|
{
|
||||||
if (plSimulationMgr::fExtraProfile)
|
if (plSimulationMgr::fExtraProfile)
|
||||||
SimLog("Setting kinematic from %f,%f,%f to %f,%f,%f",pos.fX,pos.fY,pos.fZ+kPhysZOffset,kinPos.x,kinPos.y,kinPos.z );
|
SimLog("Setting kinematic from %f,%f,%f to %f,%f,%f",pos.fX,pos.fY,pos.fZ+kPhysZOffset,kinPos.x,kinPos.y,kinPos.z );
|
||||||
@ -488,9 +491,9 @@ void plPXPhysicalControllerCore::ISetKinematicLoc(const hsMatrix44& l2w)
|
|||||||
// add z offset
|
// add z offset
|
||||||
kPos.fZ += kPhysZOffset;
|
kPos.fZ += kPhysZOffset;
|
||||||
// Update the physical position of kinematic
|
// Update the physical position of kinematic
|
||||||
if (fEnabled && fKinematicActor->readBodyFlag(NX_BF_KINEMATIC))
|
if (fEnabled || fBehavingLikeAnimatedPhys)
|
||||||
fKinematicActor->moveGlobalPosition(plPXConvert::Point(kPos));
|
fKinematicActor->moveGlobalPosition(plPXConvert::Point(kPos));
|
||||||
else if (fEnabled)
|
else
|
||||||
fKinematicActor->setGlobalPosition(plPXConvert::Point(kPos));
|
fKinematicActor->setGlobalPosition(plPXConvert::Point(kPos));
|
||||||
}
|
}
|
||||||
void plPXPhysicalControllerCore::IGetPositionSim(hsPoint3& pos) const
|
void plPXPhysicalControllerCore::IGetPositionSim(hsPoint3& pos) const
|
||||||
|
Reference in New Issue
Block a user