summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah-thomas774 <elijahthomas774@gmail.com>2025-03-20 22:05:01 -0400
committerelijah-thomas774 <elijahthomas774@gmail.com>2025-03-20 22:05:01 -0400
commite2c2ec6c2dc0da586adcdfa2c71e54466d39dff0 (patch)
treece5e3c87abd03799a70929168f3c5be01004cefc
parent5a84a6248a239b6c2e1571b2d9948e427b5b5aed (diff)
fix EGG::Matrix34f Copy assignment
-rw-r--r--include/egg/math/eggMatrix.h5
-rw-r--r--src/REL/d/a/obj/d_a_obj_pool_cock.cpp7
2 files changed, 8 insertions, 4 deletions
diff --git a/include/egg/math/eggMatrix.h b/include/egg/math/eggMatrix.h
index 89060283..a99a0698 100644
--- a/include/egg/math/eggMatrix.h
+++ b/include/egg/math/eggMatrix.h
@@ -24,6 +24,11 @@ struct Matrix34f {
return arr[i];
}
+ Matrix34f &operator=(const Matrix34f &other) {
+ copyFrom(other);
+ return *this;
+ }
+
void rotateBaseX(Vector3f &, Matrix34f &);
void rotateVectorChange(Vector3f &, Vector3f &, Matrix34f &);
void inverseTo(Matrix34f &to) const;
diff --git a/src/REL/d/a/obj/d_a_obj_pool_cock.cpp b/src/REL/d/a/obj/d_a_obj_pool_cock.cpp
index f52cd41e..585c021c 100644
--- a/src/REL/d/a/obj/d_a_obj_pool_cock.cpp
+++ b/src/REL/d/a/obj/d_a_obj_pool_cock.cpp
@@ -52,10 +52,9 @@ int dAcOPoolCock_c::actorExecute() {
position += velocity;
position += mStts.mCcMove;
updateMatrix();
- mMtx_c mdl1Transform;
- mMtx_c mdl2Transform;
- mdl1Transform = mWorldMtx;
- mdl2Transform = mWorldMtx;
+
+ mMtx_c mdl1Transform(mWorldMtx);
+ mMtx_c mdl2Transform(mWorldMtx);
mMtx_c tmp1;
mMtx_c tmp2;