2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:07:43 +00:00

Bug fixes and CGuiFrame mouse events

This commit is contained in:
Jack Andersen
2019-01-19 20:43:11 -10:00
parent 851e113dc0
commit 47c6b5cba8
21 changed files with 118 additions and 46 deletions

View File

@@ -74,9 +74,9 @@ void CBSAttack::UpdatePhysicsActor(CBodyController& bc, float dt) {
if (x34_curTime >= x2c_alignTargetPosStartTime && x34_curTime <= x30_alignTargetPosTime) {
if (TCastToPtr<CPhysicsActor> act = bc.GetOwner()) {
zeus::CVector3f delta = x20_targetPos - act->GetTranslation();
float td = x30_alignTargetPosTime - x2c_alignTargetPosStartTime;
if (dt > 0.f)
delta *= zeus::CVector3f(dt / td);
float dur = x30_alignTargetPosTime - x2c_alignTargetPosStartTime;
if (dur > 0.f)
delta *= zeus::CVector3f(dt / dur);
zeus::CVector3f localDelta = act->GetTransform().transposeRotate(delta);
act->ApplyImpulseWR(act->GetMoveToORImpulseWR(localDelta, dt), zeus::CAxisAngle::sIdentity);
}