Jump to content

Fix White Textures


TAUMP

Recommended Posts

  • Premium

Hello, 100% you saw this shit visual bug from some angle are white (npc)
 

Thing.cpp
Find ->

CGrannyMotion * CGraphicThing::GetMotionPointer(int iMotion)

After this function add this

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;
}

Thing.h
Find ->

int GetMotionCount() const;

adD UNDER

		int						GetTextureCount() const;
		const char *			GetTexturePath(int iTexture);

Open and find -> ActorInstanceData

Replace this
 

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

with this
 

			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);

 

171424image.thumb.png.a800aadb467140ee4f

 

Its not my fix, i found it in inception source.

  • Love 1
  • Love 10


 

Link to comment
Share on other sites

Announcements



  • Similar Content

  • Similar Content

  • Similar Content

  • Tags

  • Activity

    1. 2

      Feeding game source to LLM

    2. 0

      Target Information System

    3. 2

      Feeding game source to LLM

    4. 2

      anti exp explanation pls

    5. 2

      Feeding game source to LLM

    6. 2

      anti exp explanation pls

    7. 0

      [GR2] Positioning an object added with "Attach"

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.