Skip to content

Commit f1ef7f5

Browse files
committed
Fix CRESineWave initialization
Resolves #470
1 parent 1700076 commit f1ef7f5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

Runtime/Particle/CParticleDataFactory.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,10 @@ std::unique_ptr<CRealElement> CParticleDataFactory::GetRealElement(CInputStream&
507507
return std::make_unique<CRELifetimePercent>(std::move(a));
508508
}
509509
case SBIG('SINE'): {
510-
auto a = GetRealElement(in);
511-
auto b = GetRealElement(in);
512-
auto c = GetRealElement(in);
513-
return std::make_unique<CRESineWave>(std::move(a), std::move(b), std::move(c));
510+
auto frequency = GetRealElement(in);
511+
auto amplitude = GetRealElement(in);
512+
auto phase = GetRealElement(in);
513+
return std::make_unique<CRESineWave>(std::move(phase), std::move(frequency), std::move(amplitude));
514514
}
515515
case SBIG('ISWT'): {
516516
auto a = GetRealElement(in);

Runtime/Particle/CRealElement.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ class CRESineWave : public CRealElement {
151151
std::unique_ptr<CRealElement> xc_phase;
152152

153153
public:
154-
CRESineWave(std::unique_ptr<CRealElement>&& a, std::unique_ptr<CRealElement>&& b, std::unique_ptr<CRealElement>&& c)
155-
: x4_frequency(std::move(b)), x8_amplitude(std::move(c)), xc_phase(std::move(a)) {}
154+
CRESineWave(std::unique_ptr<CRealElement>&& phase, std::unique_ptr<CRealElement>&& frequency,
155+
std::unique_ptr<CRealElement>&& amplitude)
156+
: x4_frequency(std::move(frequency)), x8_amplitude(std::move(amplitude)), xc_phase(std::move(phase)) {}
156157
bool GetValue(int frame, float& valOut) const override;
157158
};
158159

Runtime/Weapon/CTargetableProjectile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bool CTargetableProjectile::Explode(const zeus::CVector3f& pos, const zeus::CVec
5757
}
5858

5959
void CTargetableProjectile::ResolveCollisionWithActor(const CRayCastResult& res, CActor& act, CStateManager& mgr) {
60-
zeus::CTransform xf = zeus::lookAt(GetTranslation(), GetAimPosition(mgr, 0.1f));
60+
zeus::CTransform xf = zeus::lookAt(GetTranslation(), GetAimPosition(mgr, 0.1f));
6161
xf.origin = GetTranslation();
6262
SetTransform(xf);
6363
CEnergyProjectile::ResolveCollisionWithActor(res, act, mgr);

0 commit comments

Comments
 (0)