Jump to content

Fix - Effect rendering bug on models with opacity when the effect is inside the model


Recommended Posts

  • Honorable Member

There's a bug in the game if you have like an NPC and you set its opacity to less then 1.0 and attach effects to it and the effects are inside the model. The effect will not be rendered because the effect rendering is after character rendering so when it's stenciling it, it won't know what should be seen behind the model.


To fix this we just have to pre-render the effects in this case.

To achieve this add this code to the beginning of CActorInstance::OnRender

if (GetAlphaValue() < 1.0f)
	for (auto it = m_AttachingEffectList.begin(); it != m_AttachingEffectList.end(); ++it)


and add a new method to CEffectManager in EffectLib/EffectManager.h:

void RenderEffect();

and for sure define it in EffectManager.cpp

void CEffectManager::RenderEffect()
	if (!m_pSelectedEffectInstance)



Now you can create eg. mounts with effects like this:



Hope you like it and will be useful! ;)

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 15


Link to comment
Share on other sites

  • Management
9 hours ago, MrQuin said:



It's done.

  • Love 2

My empire, my kingdom... of Metin2... I will dominate the world and dominate you all...
metin2.dev | fr.metin2.dev | metin2dev.org | metin2.download | metin2.top | top-metin2.org


Link to comment
Share on other sites

  • 1 year later...
  • Silver

@ Distraught Thanks for the release, but it will make a visual bug in character select. You can see the select target on characters.





Edited by Metin2 Dev
Core X - External 2 Internal

I'll be always helpful! 👊 

Link to comment
Share on other sites

  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.