Browse Source

Some fixes from mingw.

Darryl Pogue 13 years ago
parent
commit
a743da47fb
  1. 3
      Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp
  2. 12
      Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp
  3. 3
      Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp
  4. 10
      Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp

3
Sources/Plasma/FeatureLib/pfAnimation/plLineFollowMod.cpp

@ -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);

12
Sources/Plasma/FeatureLib/pfCamera/plCameraBrain.cpp

@ -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);

3
Sources/Plasma/FeatureLib/pfCamera/plCameraModifier.cpp

@ -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();
} }

10
Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp

@ -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());

Loading…
Cancel
Save