mirror of https://github.com/AxioDL/metaforce.git
Fix platform riders not being dragged when the platform is rotated by CScriptActorRotate
This commit is contained in:
parent
83fc649023
commit
54691cf035
|
@ -79,9 +79,8 @@ void CScriptActorRotate::UpdatePlatformRiders(std::vector<SRiders>& riders, CScr
|
||||||
for (SRiders& rider : riders) {
|
for (SRiders& rider : riders) {
|
||||||
if (const TCastToPtr<CActor> act = mgr.ObjectById(rider.x0_uid)) {
|
if (const TCastToPtr<CActor> act = mgr.ObjectById(rider.x0_uid)) {
|
||||||
zeus::CTransform& riderXf = rider.x8_transform;
|
zeus::CTransform& riderXf = rider.x8_transform;
|
||||||
act->SetTransform(rider.x8_transform);
|
act->SetTransform(xf * rider.x8_transform);
|
||||||
act->SetTranslation(act->GetTranslation() + plat.GetTranslation());
|
act->SetTranslation(act->GetTranslation() + plat.GetTranslation());
|
||||||
|
|
||||||
if (!x58_24_updateRotation) {
|
if (!x58_24_updateRotation) {
|
||||||
riderXf = {act->GetTransform().basis, act->GetTranslation() - plat.GetTranslation()};
|
riderXf = {act->GetTransform().basis, act->GetTranslation() - plat.GetTranslation()};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue