NPC Beyaz Gözükme / Texture Fix

MEKA

Discord: mekaprojects
Süper Moderatör
Premium Üye
Grafiker
Geliştirici
Yardımsever Üye
Editör
Mesaj
2.779
Çözümler
287
Beğeni
2.023
Puan
1.850
Ticaret Puanı
2
Kendim test ettim ve çalışıyor uzun süredir aradıgım bir fix. Sıfırdan bir files yapanlara yardımı olacagını düşünüyorum.

Nu3fHUeSR26ZvihMBqi9_Q.png
neTIoUjmTwe9E0Y-b8ARjg.png

Userinterface/Locale.inc.h​

Kod:
#define NPC_TEXTURE_FIX

EterGrnLib/Thing.cpp​

Arat​

C++:
CGrannyMotion * CGraphicThing::GetMotionPointer(int iMotion)

Altına Ekle​

C++:
#ifdef NPC_TEXTURE_FIX
int CGraphicThing::GetTextureCount() const
{
    if (!m_pgrnFileInfo)
        return 0;

    if (m_pgrnFileInfo->TextureCount <= 0)
        return 0;

    return (m_pgrnFileInfo->TextureCount);
}

const char * CGraphicThing::GetTexturePath(int iTexture)
{
    if(iTexture >= GetTextureCount())
        return "";

    return m_pgrnFileInfo->Textures[iTexture]->FromFileName;
}
#endif

EterGrnLib/Thing.h​

Arat​

C++:
        int                        GetMotionCount() const;

Altına Ekle​

C++:
#ifdef NPC_TEXTURE_FIX
        int                        GetTextureCount() const;
        const char *            GetTexturePath(int iTexture);
#endif

GameLib/ActorInstanceData.cpp​

Arat​

C++:
            CGraphicThing* pLODModelThing = pRaceData->GetLODModelThing();
            RegisterLODThing(0, pLODModelThing);

Degistir​

C++:
#ifdef NPC_TEXTURE_FIX
            CGraphicThing* pLODModelThing = pRaceData->GetLODModelThing();

            bool canLOD = true;
            if (pModelThing && pLODModelThing) {
                if (pModelThing->GetTextureCount() == pLODModelThing->GetTextureCount()) {
                    for (int i = 0; i < pModelThing->GetTextureCount(); i++) {
                        if (strcmp(pModelThing->GetTexturePath(i), pLODModelThing->GetTexturePath(i)) != 0)
                            canLOD = false;
                    }
                } else {
                    canLOD = false;
                }
            }

            if(canLOD)
                RegisterLODThing(0, pLODModelThing);
#endif

Degistirdikten sonra bu şekilde olacak yapamayan arkadaşlar için​

C++:
    {
        if (pRaceData->IsTree())
        {
            __CreateTree(pRaceData->GetTreeFileName());
        }
        else
        {
            CGraphicThing* pModelThing = pRaceData->GetBaseModelThing();
            RegisterModelThing(0, pModelThing);

#ifdef NPC_TEXTURE_FIX
            CGraphicThing* pLODModelThing = pRaceData->GetLODModelThing();

            bool canLOD = true;
            if (pModelThing && pLODModelThing) {
                if (pModelThing->GetTextureCount() == pLODModelThing->GetTextureCount()) {
                    for (int i = 0; i < pModelThing->GetTextureCount(); i++) {
                        if (strcmp(pModelThing->GetTexturePath(i), pLODModelThing->GetTexturePath(i)) != 0)
                            canLOD = false;
                    }
                } else {
                    canLOD = false;
                }
            }

            if(canLOD)
                RegisterLODThing(0, pLODModelThing);
#endif

            SetModelInstance(0, 0, 0);
        }
    }

Alıntı Yapılan Kaynak :
Linkleri görebilmek için giriş yap veya kayıt ol.
 
Son düzenleme:
Geri
Üst