mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-27 10:24:18 +00:00
(Proposal) Introduce arithmetic operators to Vector2 (#1193)
This commit is contained in:
committed by
GitHub
parent
4d8098a6c2
commit
94ce89cbaa
@@ -721,13 +721,13 @@ void Isle::Enable(MxBool p_enable)
|
||||
Mx3DPointFloat position(UserActor()->GetROI()->GetWorldPosition());
|
||||
|
||||
Mx3DPointFloat sub(-21.375f, 0.0f, -41.75f);
|
||||
((Vector3&) sub).Sub(position);
|
||||
sub -= position;
|
||||
if (sub.LenSquared() < 1024.0f) {
|
||||
AnimationManager()->FUN_10064740(NULL);
|
||||
}
|
||||
|
||||
Mx3DPointFloat sub2(98.874992f, 0.0f, -46.156292f);
|
||||
((Vector3&) sub2).Sub(position);
|
||||
sub2 -= position;
|
||||
if (sub2.LenSquared() < 1024.0f) {
|
||||
AnimationManager()->FUN_10064670(NULL);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ MxLong LegoAct2::Notify(MxParam& p_param)
|
||||
Mx3DPointFloat unk0x10d8(m_pepper->GetWorldPosition());
|
||||
Mx3DPointFloat locala4(unk0x10d8);
|
||||
|
||||
((Vector3&) entityPosition).Sub(unk0x10d8);
|
||||
entityPosition -= unk0x10d8;
|
||||
|
||||
MxMatrix local2world(m_pepper->GetLocal2World());
|
||||
Vector3 local30(local2world[0]);
|
||||
@@ -324,8 +324,8 @@ MxLong LegoAct2::Notify(MxParam& p_param)
|
||||
local28.Unitize();
|
||||
|
||||
Mx3DPointFloat local90(local28);
|
||||
((Vector3&) local90).Mul(1.25f);
|
||||
((Vector3&) locala4).Add(local90);
|
||||
local90 *= 1.25f;
|
||||
locala4 += local90;
|
||||
locala4[1] += 0.25;
|
||||
local30.EqualsCross(&localac, &local28);
|
||||
local30.Unitize();
|
||||
@@ -1024,7 +1024,7 @@ void LegoAct2::FUN_100521f0(MxS32 p_param1)
|
||||
if (objectId != (Act2mainScript::Script) 0) {
|
||||
Mx3DPointFloat local30(vec);
|
||||
Mx3DPointFloat position(m_pepper->GetWorldPosition());
|
||||
((Vector3&) local30).Sub(position);
|
||||
local30 -= position;
|
||||
Mx3DPointFloat local44 = local30;
|
||||
local30.Unitize();
|
||||
FUN_10052560(objectId, TRUE, TRUE, &vec, &local30, NULL);
|
||||
|
||||
Reference in New Issue
Block a user