mirror of https://github.com/AxioDL/metaforce.git
CGrenadeLauncher: Fix rendering
This commit is contained in:
parent
ffd94d1106
commit
deba91bfc0
|
@ -127,10 +127,12 @@ std::optional<zeus::CAABox> CGrenadeLauncher::GetTouchBounds() const {
|
||||||
|
|
||||||
void CGrenadeLauncher::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) {
|
void CGrenadeLauncher::PreRender(CStateManager& mgr, const zeus::CFrustum& frustum) {
|
||||||
if (x3f4_color3.a() == 1.f) {
|
if (x3f4_color3.a() == 1.f) {
|
||||||
|
xb4_drawFlags = CModelFlags{2, 0, 3, zeus::skWhite};
|
||||||
// Original code redundantly sets a() = 1.f
|
// Original code redundantly sets a() = 1.f
|
||||||
xb4_drawFlags = CModelFlags{2, 0, 3, x3f4_color3};
|
xb4_drawFlags.addColor = x3f4_color3;
|
||||||
} else {
|
} else {
|
||||||
xb4_drawFlags = CModelFlags{5, 0, 3, x3f4_color3};
|
xb4_drawFlags = CModelFlags{5, 0, 3, zeus::skWhite};
|
||||||
|
xb4_drawFlags.addColor = x3f4_color3;
|
||||||
}
|
}
|
||||||
CActor::PreRender(mgr, frustum);
|
CActor::PreRender(mgr, frustum);
|
||||||
}
|
}
|
||||||
|
@ -151,7 +153,7 @@ void CGrenadeLauncher::Think(float dt, CStateManager& mgr) {
|
||||||
UpdateCollision();
|
UpdateCollision();
|
||||||
UpdateColor(dt);
|
UpdateColor(dt);
|
||||||
sub_8022f9e0(mgr, dt);
|
sub_8022f9e0(mgr, dt);
|
||||||
sub_8022f69c(dt);
|
UpdateDamageTime(dt);
|
||||||
|
|
||||||
const SAdvancementDeltas& deltas = CActor::UpdateAnimation(dt, mgr, true);
|
const SAdvancementDeltas& deltas = CActor::UpdateAnimation(dt, mgr, true);
|
||||||
MoveToOR(deltas.x0_posDelta, dt);
|
MoveToOR(deltas.x0_posDelta, dt);
|
||||||
|
@ -190,7 +192,7 @@ void CGrenadeLauncher::UpdateColor(float arg) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGrenadeLauncher::sub_8022f69c(float arg) {
|
void CGrenadeLauncher::UpdateDamageTime(float arg) {
|
||||||
if (x3ec_damageTimer <= 0.f) {
|
if (x3ec_damageTimer <= 0.f) {
|
||||||
xd0_damageMag = x3e8_thermalMag;
|
xd0_damageMag = x3e8_thermalMag;
|
||||||
} else {
|
} else {
|
||||||
|
@ -297,7 +299,7 @@ void CGrenadeLauncher::LaunchGrenade(CStateManager& mgr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& anim = animData->GetCharacterInfo().GetPASDatabase().FindBestAnimation({24}, -1);
|
const auto& anim = animData->GetCharacterInfo().GetPASDatabase().FindBestAnimation({23}, -1);
|
||||||
if (anim.first > 0.f) {
|
if (anim.first > 0.f) {
|
||||||
animData->AddAdditiveAnimation(anim.second, 1.f, false, true);
|
animData->AddAdditiveAnimation(anim.second, 1.f, false, true);
|
||||||
const zeus::CVector3f& origin =
|
const zeus::CVector3f& origin =
|
||||||
|
|
|
@ -115,7 +115,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void UpdateCollision();
|
void UpdateCollision();
|
||||||
void UpdateColor(float arg);
|
void UpdateColor(float arg);
|
||||||
void sub_8022f69c(float arg);
|
void UpdateDamageTime(float arg);
|
||||||
void CreateExplosion(CStateManager& mgr);
|
void CreateExplosion(CStateManager& mgr);
|
||||||
void sub_8022f9e0(CStateManager& mgr, float dt);
|
void sub_8022f9e0(CStateManager& mgr, float dt);
|
||||||
void sub_80230438();
|
void sub_80230438();
|
||||||
|
|
Loading…
Reference in New Issue