mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Some fixes from mingw.
This commit is contained in:
@ -572,7 +572,8 @@ void plLineFollowMod::ISetTargetTransform(int iTarg, const hsMatrix44& unclTgtXf
|
|||||||
xlate.Reset();
|
xlate.Reset();
|
||||||
xlate.SetTranslate(&oldPos);
|
xlate.SetTranslate(&oldPos);
|
||||||
w2l = w2l * xlate;
|
w2l = w2l * xlate;
|
||||||
xlate.SetTranslate(&-pos);
|
hsPoint3 neg = -pos;
|
||||||
|
xlate.SetTranslate(&neg);
|
||||||
w2l = w2l * xlate;
|
w2l = w2l * xlate;
|
||||||
|
|
||||||
ci->SetTransform(l2w, w2l);
|
ci->SetTransform(l2w, w2l);
|
||||||
|
@ -132,7 +132,8 @@ fOffsetPct(1.0f)
|
|||||||
fPOAGoal.Set(0,0,0);
|
fPOAGoal.Set(0,0,0);
|
||||||
fGoal.Set(1,1,1);
|
fGoal.Set(1,1,1);
|
||||||
fPOAOffset.Set(0,0,0);
|
fPOAOffset.Set(0,0,0);
|
||||||
fTargetMatrix.Make(&fGoal, &fPOAGoal, &hsVector3(0,0,1));
|
hsVector3 up(0, 0, 1);
|
||||||
|
fTargetMatrix.Make(&fGoal, &fPOAGoal, &up);
|
||||||
fFlags.Clear();
|
fFlags.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -758,8 +759,8 @@ void plCameraBrain1_Drive::Pop()
|
|||||||
//
|
//
|
||||||
void plCameraBrain1_Drive::Update(hsBool forced)
|
void plCameraBrain1_Drive::Update(hsBool forced)
|
||||||
{
|
{
|
||||||
|
hsVector3 neg_up = -1 * fUp;
|
||||||
fTargetMatrix.Make(&fGoal, &fPOAGoal, &(-1*fUp));
|
fTargetMatrix.Make(&fGoal, &fPOAGoal, &neg_up);
|
||||||
|
|
||||||
// update our desired position:
|
// update our desired position:
|
||||||
double time = hsTimer::GetSeconds();
|
double time = hsTimer::GetSeconds();
|
||||||
@ -1628,14 +1629,15 @@ void plCameraBrain1_Circle::Update(hsBool forced)
|
|||||||
|
|
||||||
fPOAGoal += fPOAOffset;
|
fPOAGoal += fPOAOffset;
|
||||||
|
|
||||||
|
hsPoint3 goalpos = fCamera->GetTargetPos();
|
||||||
if (HasFlag(kCutPosOnce))
|
if (HasFlag(kCutPosOnce))
|
||||||
{
|
{
|
||||||
fGoal = MoveTowardsFromGoal(&fCamera->GetTargetPos(), secs, true);
|
fGoal = MoveTowardsFromGoal(&goalpos, secs, true);
|
||||||
fFlags.ClearBit(kCutPos);
|
fFlags.ClearBit(kCutPos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fGoal = MoveTowardsFromGoal(&fCamera->GetTargetPos(), secs);
|
fGoal = MoveTowardsFromGoal(&goalpos, secs);
|
||||||
fFlags.SetBit(kCutPos);
|
fFlags.SetBit(kCutPos);
|
||||||
}
|
}
|
||||||
AdjustForInput(secs);
|
AdjustForInput(secs);
|
||||||
|
@ -274,7 +274,8 @@ void plCameraModifier1::Update()
|
|||||||
// have to ask the avatar controller for the subworld key.
|
// have to ask the avatar controller for the subworld key.
|
||||||
if (!worldKey)
|
if (!worldKey)
|
||||||
{
|
{
|
||||||
plArmatureMod* armMod = plAvatarMgr::FindAvatar(plKey(GetBrain()->GetSubject()->GetKey()));
|
plKey subject = plKey(GetBrain()->GetSubject()->GetKey());
|
||||||
|
plArmatureMod* armMod = plAvatarMgr::FindAvatar(subject);
|
||||||
if (armMod && armMod->GetController() )
|
if (armMod && armMod->GetController() )
|
||||||
worldKey = armMod->GetController()->GetSubworld();
|
worldKey = armMod->GetController()->GetSubworld();
|
||||||
}
|
}
|
||||||
@ -491,4 +492,4 @@ void plCameraModifier1::SetTransform(hsPoint3 at)
|
|||||||
l2w.Make(&fFrom, &at, &up);
|
l2w.Make(&fFrom, &at, &up);
|
||||||
l2w.GetInverse(&w2l);
|
l2w.GetInverse(&w2l);
|
||||||
IGetTargetCoordinateInterface(0)->SetTransform( l2w, w2l );
|
IGetTargetCoordinateInterface(0)->SetTransform( l2w, w2l );
|
||||||
}
|
}
|
||||||
|
@ -1980,9 +1980,15 @@ void plVirtualCam1::StartTransition(CamTrans* transition)
|
|||||||
hsVector3 dist;
|
hsVector3 dist;
|
||||||
// figure out transition time
|
// figure out transition time
|
||||||
if (transition->fCutPos)
|
if (transition->fCutPos)
|
||||||
dist.Set(&(fTransitionCamera->GetTargetPOA() - pCam->GetTargetPOA()));
|
{
|
||||||
|
hsPoint3 poadist = fTransitionCamera->GetTargetPOA() - pCam->GetTargetPOA();
|
||||||
|
dist.Set(&poadist);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
dist.Set(&(fTransitionCamera->GetTargetPos() - pCam->GetTargetPos()));
|
{
|
||||||
|
hsPoint3 posdist = fTransitionCamera->GetTargetPos() - pCam->GetTargetPos();
|
||||||
|
dist.Set(&posdist);
|
||||||
|
}
|
||||||
|
|
||||||
time = (double)(dist.Magnitude() / pBrain->GetVelocity());
|
time = (double)(dist.Magnitude() / pBrain->GetVelocity());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user