MR-5: FlyTarget fixes

This commit is contained in:
Mind Rapist
2025-12-29 00:21:32 +02:00
parent 387d7bf72d
commit 55b2d70459
6 changed files with 62 additions and 8 deletions

View File

@@ -32,6 +32,18 @@ void CActorInstance::SetMaterialAlpha(DWORD dwAlpha)
void CActorInstance::OnRender()
{
// MR-5: Fix effect rendering when actor is semi-transparent
// Credits to d1str4ught
if (GetAlphaValue() < 1.0f)
{
for (auto it = m_AttachingEffectList.begin(); it != m_AttachingEffectList.end(); ++it)
{
CEffectManager::Instance().SelectEffectInstance(it->dwEffectIndex);
CEffectManager::Instance().RenderEffect();
}
}
// MR-5: -- END OF -- Fix effect rendering when actor is semi-transparent
D3DMATERIAL9 kMtrl;
STATEMANAGER.GetMaterial(&kMtrl);

View File

@@ -147,9 +147,9 @@ namespace NMotionEvent
isFishingEffect = FALSE;
}
dwEffectIndex = GetCaseCRC32(strEffectFileName.c_str(), strEffectFileName.length());
#ifndef _DEBUG
// #ifndef _DEBUG
CEffectManager::Instance().RegisterEffect(strEffectFileName.c_str());
#endif
// #endif
return true;
}
@@ -188,10 +188,10 @@ namespace NMotionEvent
return false;
dwFlyIndex = GetCaseCRC32(strFlyFileName.c_str(), strFlyFileName.length());
#ifndef _DEBUG
// #ifndef _DEBUG
// Register Fly
CFlyingManager::Instance().RegisterFlyingData(strFlyFileName.c_str());
#endif
// #endif
return true;
}