Decomp fixes for CPowerBeam

This commit is contained in:
Henrique Gemignani Passos Lima 2022-11-15 22:07:10 +02:00
parent 4001bfe4a2
commit 74509d2a4a
No known key found for this signature in database
GPG Key ID: E224F951761145F8
1 changed files with 4 additions and 2 deletions

View File

@ -4,6 +4,7 @@
#include "Runtime/CSimplePool.hpp"
#include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/Graphics/CCubeRenderer.hpp"
namespace metaforce {
@ -17,8 +18,9 @@ CPowerBeam::CPowerBeam(CAssetId characterId, EWeaponType type, TUniqueId playerI
void CPowerBeam::PreRenderGunFx(const CStateManager& mgr, const zeus::CTransform& xf) {
zeus::CTransform backupView = CGraphics::g_ViewMatrix;
CGraphics::SetViewPointMatrix(xf.inverse() * backupView);
CGraphics::SetModelMatrix(zeus::CTransform());
if (x234_shotSmokeGen)
g_Renderer->SetModelMatrix(zeus::CTransform());
if (x234_shotSmokeGen && x240_smokeState != ESmokeState::Inactive)
x234_shotSmokeGen->Render();
CGraphics::SetViewPointMatrix(backupView);
}