Jump to content

[C++] Dynamic Shadows for Trees & Objects + Remove Static shadowmap Logic


Recommended Posts

  • 3 weeks later...

If you want shadows for bridges, etc., you must install a second shadow for the isPC and make adjustments in Area.cpp.

Works for iGPUS + dGPUS.

on 0:30 bridge:

The trees don't cast any shadows because of the billboard, so I'll have to think about that some more.

Thanks for the release.

 

Spoiler

 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Love 1
  • Active+ Member
5 hours ago, DerUranov97 said:

If you want shadows for bridges, etc., you must install a second shadow for the isPC and make adjustments in Area.cpp.

Works for iGPUS + dGPUS.

on 0:30 bridge:

The trees don't cast any shadows because of the billboard, so I'll have to think about that some more.

Thanks for the release.

 

  Hide contents

 

SHARE THE BASE FOR BRIDGES!🤑

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Active Member
14 hours ago, DerUranov97 said:

If you want shadows for bridges, etc., you must install a second shadow for the isPC and make adjustments in Area.cpp.

Works for iGPUS + dGPUS.

on 0:30 bridge:

The trees don't cast any shadows because of the billboard, so I'll have to think about that some more.

Thanks for the release.

 

  Hide contents

 

First-person camera LMAO 
The game looks so unusual from this angle, hahaha 🤣

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Eyes 1
On 12/8/2025 at 9:29 AM, DerUranov97 said:

If you want shadows for bridges, etc., you must install a second shadow for the isPC and make adjustments in Area.cpp.

Works for iGPUS + dGPUS.

on 0:30 bridge:

The trees don't cast any shadows because of the billboard, so I'll have to think about that some more.

Thanks for the release.

 

  Reveal hidden contents

 

 

It would be much more effective if the object could not cast shadows on itself

Edited by Metin2 Dev International
Core X - External 2 Internal
8 minutes ago, Filachilla said:

 

It would be much more effective if the object could not cast shadows on itself

It's a bit tricky. That was an older video. Dynamic Shadow/Sun only knows the difference between isHeight and normal. 
With changes and writing in what the bridge is called, it works quite well. In my case, it's isBridge.

29 minutes ago, DerUranov97 said:

It's a bit tricky. That was an older video. Dynamic Shadow/Sun only knows the difference between isHeight and normal. 
With changes and writing in what the bridge is called, it works quite well. In my case, it's isBridge.

It depends on how far you want to go. I made extra caster because in original source exist only receiver. When the ymir guys were programming it, they weren't interested in such things at the time.

I mean something like this:

        std::vector<CGraphicObjectInstance*> m_ShadowReceiverVector;
        std::vector<CGraphicObjectInstance*> m_ShadowCasterVector;

  • Good 1

This should work for everyone. If I have forgotten something and it does not work, please contact me. It is the simple version with isHeight & Normal.
Gyazo:  Shadow Bridge
 

# Shadow System for isHeight Objects

## Overview
isHeight objects (bridges, platforms) receive shadows but do not cast shadows.

## Changes

### 1. ThingInstance.h

**File:** `/src/EterGrnLib/ThingInstance.h`

Add after `bool HaveBlendThing();`:
```cpp
bool	HaveBlendThing();
bool	IsHeightObject();
```

---

### 2. ThingInstance.cpp

**File:** `/src/EterGrnLib/ThingInstance.cpp`

Add after HaveBlendThing() method:
```cpp
bool CGraphicThingInstance::HaveBlendThing()
{
	for (int i = 0; i < m_LODControllerVector.size(); i++)
	{
		if (m_LODControllerVector[i]->HaveBlendThing())
			return true;
	}
	return false;
}

bool CGraphicThingInstance::IsHeightObject()
{
	return (m_pHeightAttributeInstance && m_pHeightAttributeInstance->IsHeightData());
}
```

---

### 3. Area.cpp

**File:** src/GameLib/Area.cpp`

In Refresh() method:
```cpp
if (pObjectInstance->isShadowFlag)
{
	bool isHeightOnly = (pObjectInstance->pAttributeInstance && 
	                     pObjectInstance->pAttributeInstance->IsHeightData());
	
	if (!isHeightOnly)
	{
		m_ShadowThingCloneInstaceVector.push_back(pObjectInstance->pThingInstance);
	}
}
```

---

### 4. MapOutdoorRender.cpp

**File:** GameLib/MapOutdoorRender.cpp`

Struct definition:
```cpp
struct CMapOutdoor_FOpaqueThingInstanceRenderWithShadow
{
	LPDIRECT3DTEXTURE9 m_lpShadowTexture;
	
	CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(LPDIRECT3DTEXTURE9 lpShadowTex) 
		: m_lpShadowTexture(lpShadowTex) {}
	
	inline void operator () (CGraphicThingInstance * pkThingInst)
	{
		if (pkThingInst->IsHeightObject())
		{
			STATEMANAGER.SetTexture(1, m_lpShadowTexture);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);
			pkThingInst->RenderWithShadowTexture();
		}
		else
		{
			STATEMANAGER.SetTexture(1, NULL);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
			pkThingInst->Render();
		}
	}
};
```

Function call:
```cpp
std::for_each(s_kVct_pkOpaqueThingInstSort.begin(), 
              s_kVct_pkOpaqueThingInstSort.end(), 
              CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(m_lpCharacterShadowMapTexture));
```

---

### 5. AttributeInstance (if IsHeightData() is missing)

**File:** `client source 26.11/src/GameLib/AttributeInstance.cpp`

```cpp
bool CAttributeInstance::IsHeightData() const
{
	if (!m_pAttributeData)
		return false;
	
	return m_pAttributeData->IsHeightData();
}
```

---

## Behavior

**Shadow Receiving:**
- isHeight objects: Receive shadows
- Normal buildings: Do not receive shadows

**Shadow Casting:**
- isHeight objects: Do not cast shadows
- Normal buildings: Cast shadows

---

 

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

@DerUranov97 Something missing?

 

Spoiler
ThingInstance.cpp:

bool CGraphicThingInstance::HaveBlendThing()
{
	for (int i = 0; i < m_LODControllerVector.size(); i++)
	{
		if (m_LODControllerVector[i]->HaveBlendThing())
			return true;
	}
	return false;
}

bool CGraphicThingInstance::IsHeightObject()
{
	return (m_pHeightAttributeInstance && m_pHeightAttributeInstance->IsHeightData());
}

ThingInstance.h:

		bool	HaveBlendThing();
		bool	IsHeightObject();

Area.cpp:

void CArea::Refresh()
{
	m_TreeCloneInstaceVector.clear();
	m_ThingCloneInstaceVector.clear();
	m_DungeonBlockCloneInstanceVector.clear();
	m_AniThingCloneInstanceVector.clear();
	m_ShadowThingCloneInstaceVector.clear();
	m_AmbienceCloneInstanceVector.clear();

	TObjectInstanceVector::iterator it;

	for(it = m_ObjectInstanceVector.begin();it!=m_ObjectInstanceVector.end();++it)
	{
		TObjectInstance * pObjectInstance = *it;

		if (prt::PROPERTY_TYPE_TREE == pObjectInstance->dwType)
		{
			if (pObjectInstance->pTree)
			{
				m_TreeCloneInstaceVector.push_back(pObjectInstance->pTree);
				const float * pfPosition;
				pfPosition = pObjectInstance->pTree->GetPosition();
				pObjectInstance->pTree->UpdateBoundingSphere();
				pObjectInstance->pTree->UpdateCollisionData();
			}
		}
		else if (prt::PROPERTY_TYPE_BUILDING == pObjectInstance->dwType)
		{
			pObjectInstance->pThingInstance->Update();
			pObjectInstance->pThingInstance->Transform();
			pObjectInstance->pThingInstance->Show();
			pObjectInstance->pThingInstance->DeformAll();
			m_ThingCloneInstaceVector.push_back(pObjectInstance->pThingInstance);

			pObjectInstance->pThingInstance->BuildBoundingSphere();
			pObjectInstance->pThingInstance->UpdateBoundingSphere();

			if (pObjectInstance->pThingInstance->IsMotionThing())
			{
				m_AniThingCloneInstanceVector.push_back(pObjectInstance->pThingInstance);
				pObjectInstance->pThingInstance->SetMotion(0);
			}

			if (pObjectInstance->isShadowFlag)
			{
				bool isHeightOnly = (pObjectInstance->pAttributeInstance && pObjectInstance->pAttributeInstance->IsHeightData());

				if (!isHeightOnly)
				{
					m_ShadowThingCloneInstaceVector.push_back(pObjectInstance->pThingInstance);
				}
			}

MapOutdoorRender.cpp:

struct CMapOutdoor_FOpaqueThingInstanceRender
{
	inline void operator () (CGraphicThingInstance * pkThingInst)
	{
		pkThingInst->Render();
	}
};

struct CMapOutdoor_FOpaqueThingInstanceRenderWithShadow
{
	LPDIRECT3DTEXTURE8 m_lpShadowTexture;
	
	CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(LPDIRECT3DTEXTURE8 lpShadowTex) : m_lpShadowTexture(lpShadowTex) {}

	inline void operator () (CGraphicThingInstance * pkThingInst)
	{
		if (pkThingInst->IsHeightObject())
		{
			STATEMANAGER.SetTexture(1, m_lpShadowTexture);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);
			pkThingInst->RenderWithShadowTexture();
		}
		else
		{
			STATEMANAGER.SetTexture(1, NULL);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
			pkThingInst->Render();
		}
	}
};

----------------> void CMapOutdoor::RenderArea(bool bRenderAmbience)

		}

		std::sort(s_kVct_pkOpaqueThingInstSort.begin(), s_kVct_pkOpaqueThingInstSort.end(), CMapOutdoor_LessThingInstancePtrRenderOrder());
		std::for_each(s_kVct_pkOpaqueThingInstSort.begin(), s_kVct_pkOpaqueThingInstSort.end(), CMapOutdoor_FOpaqueThingInstanceRender());
		std::for_each(s_kVct_pkOpaqueThingInstSort.begin(), s_kVct_pkOpaqueThingInstSort.end(), CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(m_lpCharacterShadowMapTexture));
	}

AttributeInstance.cpp:

bool CAttributeInstance::IsHeightData() const
{
	if (!m_pAttributeData)
		return false;
	
	return m_pAttributeData->IsHeightData();
}

AttributeInstance.h:

class CAttributeInstance
{
	public:
		CAttributeInstance();
		virtual ~CAttributeInstance();

		void Clear();
		BOOL IsEmpty() const;

		const char * GetDataFileName() const;

		void SetObjectPointer(CAttributeData * pAttributeData);
		void RefreshObject(const D3DXMATRIX & c_rmatGlobal);
		CAttributeData * GetObjectPointer() const;

		bool Picking(const D3DXVECTOR3 & v, const D3DXVECTOR3 & dir, float & out_x, float & out_y);

		BOOL IsInHeight(float fx, float fy);
		BOOL GetHeight(float fx, float fy, float * pfHeight);

		bool IsHeightData() const;

 

Error:
 

Spoiler
Error	C2039	'RenderWithShadowTexture': is not a member of 'CGraphicThingInstance'	GameLib	Client\GameLib\MapOutdoorRender.cpp 428
Error	C2065	'm_pAttributeData': undeclared identifier	EterLib	Client\EterLib\AttributeInstance.cpp 220
Error	C2065	'm_pAttributeData': undeclared identifier	EterLib	Client\EterLib\AttributeInstance.cpp 223

 

Payed Marty 5.8

  • Active+ Member
On 12/17/2025 at 3:40 PM, Pseudabo said:

@DerUranov97 Something missing?

 

  Reveal hidden contents
ThingInstance.cpp:

bool CGraphicThingInstance::HaveBlendThing()
{
	for (int i = 0; i < m_LODControllerVector.size(); i++)
	{
		if (m_LODControllerVector[i]->HaveBlendThing())
			return true;
	}
	return false;
}

bool CGraphicThingInstance::IsHeightObject()
{
	return (m_pHeightAttributeInstance && m_pHeightAttributeInstance->IsHeightData());
}

ThingInstance.h:

		bool	HaveBlendThing();
		bool	IsHeightObject();

Area.cpp:

void CArea::Refresh()
{
	m_TreeCloneInstaceVector.clear();
	m_ThingCloneInstaceVector.clear();
	m_DungeonBlockCloneInstanceVector.clear();
	m_AniThingCloneInstanceVector.clear();
	m_ShadowThingCloneInstaceVector.clear();
	m_AmbienceCloneInstanceVector.clear();

	TObjectInstanceVector::iterator it;

	for(it = m_ObjectInstanceVector.begin();it!=m_ObjectInstanceVector.end();++it)
	{
		TObjectInstance * pObjectInstance = *it;

		if (prt::PROPERTY_TYPE_TREE == pObjectInstance->dwType)
		{
			if (pObjectInstance->pTree)
			{
				m_TreeCloneInstaceVector.push_back(pObjectInstance->pTree);
				const float * pfPosition;
				pfPosition = pObjectInstance->pTree->GetPosition();
				pObjectInstance->pTree->UpdateBoundingSphere();
				pObjectInstance->pTree->UpdateCollisionData();
			}
		}
		else if (prt::PROPERTY_TYPE_BUILDING == pObjectInstance->dwType)
		{
			pObjectInstance->pThingInstance->Update();
			pObjectInstance->pThingInstance->Transform();
			pObjectInstance->pThingInstance->Show();
			pObjectInstance->pThingInstance->DeformAll();
			m_ThingCloneInstaceVector.push_back(pObjectInstance->pThingInstance);

			pObjectInstance->pThingInstance->BuildBoundingSphere();
			pObjectInstance->pThingInstance->UpdateBoundingSphere();

			if (pObjectInstance->pThingInstance->IsMotionThing())
			{
				m_AniThingCloneInstanceVector.push_back(pObjectInstance->pThingInstance);
				pObjectInstance->pThingInstance->SetMotion(0);
			}

			if (pObjectInstance->isShadowFlag)
			{
				bool isHeightOnly = (pObjectInstance->pAttributeInstance && pObjectInstance->pAttributeInstance->IsHeightData());

				if (!isHeightOnly)
				{
					m_ShadowThingCloneInstaceVector.push_back(pObjectInstance->pThingInstance);
				}
			}

MapOutdoorRender.cpp:

struct CMapOutdoor_FOpaqueThingInstanceRender
{
	inline void operator () (CGraphicThingInstance * pkThingInst)
	{
		pkThingInst->Render();
	}
};

struct CMapOutdoor_FOpaqueThingInstanceRenderWithShadow
{
	LPDIRECT3DTEXTURE8 m_lpShadowTexture;
	
	CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(LPDIRECT3DTEXTURE8 lpShadowTex) : m_lpShadowTexture(lpShadowTex) {}

	inline void operator () (CGraphicThingInstance * pkThingInst)
	{
		if (pkThingInst->IsHeightObject())
		{
			STATEMANAGER.SetTexture(1, m_lpShadowTexture);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);
			pkThingInst->RenderWithShadowTexture();
		}
		else
		{
			STATEMANAGER.SetTexture(1, NULL);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
			pkThingInst->Render();
		}
	}
};

----------------> void CMapOutdoor::RenderArea(bool bRenderAmbience)

		}

		std::sort(s_kVct_pkOpaqueThingInstSort.begin(), s_kVct_pkOpaqueThingInstSort.end(), CMapOutdoor_LessThingInstancePtrRenderOrder());
		std::for_each(s_kVct_pkOpaqueThingInstSort.begin(), s_kVct_pkOpaqueThingInstSort.end(), CMapOutdoor_FOpaqueThingInstanceRender());
		std::for_each(s_kVct_pkOpaqueThingInstSort.begin(), s_kVct_pkOpaqueThingInstSort.end(), CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(m_lpCharacterShadowMapTexture));
	}

AttributeInstance.cpp:

bool CAttributeInstance::IsHeightData() const
{
	if (!m_pAttributeData)
		return false;
	
	return m_pAttributeData->IsHeightData();
}

AttributeInstance.h:

class CAttributeInstance
{
	public:
		CAttributeInstance();
		virtual ~CAttributeInstance();

		void Clear();
		BOOL IsEmpty() const;

		const char * GetDataFileName() const;

		void SetObjectPointer(CAttributeData * pAttributeData);
		void RefreshObject(const D3DXMATRIX & c_rmatGlobal);
		CAttributeData * GetObjectPointer() const;

		bool Picking(const D3DXVECTOR3 & v, const D3DXVECTOR3 & dir, float & out_x, float & out_y);

		BOOL IsInHeight(float fx, float fy);
		BOOL GetHeight(float fx, float fy, float * pfHeight);

		bool IsHeightData() const;

 

Error:
 

  Hide contents
Error	C2039	'RenderWithShadowTexture': is not a member of 'CGraphicThingInstance'	GameLib	Client\GameLib\MapOutdoorRender.cpp 428
Error	C2065	'm_pAttributeData': undeclared identifier	EterLib	Client\EterLib\AttributeInstance.cpp 220
Error	C2065	'm_pAttributeData': undeclared identifier	EterLib	Client\EterLib\AttributeInstance.cpp 223

 

Payed Marty 5.8

RenderWithShadowTexture -> RenderWithTwoTexture

m_pAttributeData -> m_roAttributeData

  • Good 1

I don’t know — I think.

 

Discord

 

On 12/16/2025 at 7:53 PM, DerUranov97 said:

This should work for everyone. If I have forgotten something and it does not work, please contact me. It is the simple version with isHeight & Normal.
Gyazo:  Shadow Bridge
 

# Shadow System for isHeight Objects

## Overview
isHeight objects (bridges, platforms) receive shadows but do not cast shadows.

## Changes

### 1. ThingInstance.h

**File:** `/src/EterGrnLib/ThingInstance.h`

Add after `bool HaveBlendThing();`:
```cpp
bool	HaveBlendThing();
bool	IsHeightObject();
```

---

### 2. ThingInstance.cpp

**File:** `/src/EterGrnLib/ThingInstance.cpp`

Add after HaveBlendThing() method:
```cpp
bool CGraphicThingInstance::HaveBlendThing()
{
	for (int i = 0; i < m_LODControllerVector.size(); i++)
	{
		if (m_LODControllerVector[i]->HaveBlendThing())
			return true;
	}
	return false;
}

bool CGraphicThingInstance::IsHeightObject()
{
	return (m_pHeightAttributeInstance && m_pHeightAttributeInstance->IsHeightData());
}
```

---

### 3. Area.cpp

**File:** src/GameLib/Area.cpp`

In Refresh() method:
```cpp
if (pObjectInstance->isShadowFlag)
{
	bool isHeightOnly = (pObjectInstance->pAttributeInstance && 
	                     pObjectInstance->pAttributeInstance->IsHeightData());
	
	if (!isHeightOnly)
	{
		m_ShadowThingCloneInstaceVector.push_back(pObjectInstance->pThingInstance);
	}
}
```

---

### 4. MapOutdoorRender.cpp

**File:** GameLib/MapOutdoorRender.cpp`

Struct definition:
```cpp
struct CMapOutdoor_FOpaqueThingInstanceRenderWithShadow
{
	LPDIRECT3DTEXTURE9 m_lpShadowTexture;
	
	CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(LPDIRECT3DTEXTURE9 lpShadowTex) 
		: m_lpShadowTexture(lpShadowTex) {}
	
	inline void operator () (CGraphicThingInstance * pkThingInst)
	{
		if (pkThingInst->IsHeightObject())
		{
			STATEMANAGER.SetTexture(1, m_lpShadowTexture);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);
			pkThingInst->RenderWithShadowTexture();
		}
		else
		{
			STATEMANAGER.SetTexture(1, NULL);
			STATEMANAGER.SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
			pkThingInst->Render();
		}
	}
};
```

Function call:
```cpp
std::for_each(s_kVct_pkOpaqueThingInstSort.begin(), 
              s_kVct_pkOpaqueThingInstSort.end(), 
              CMapOutdoor_FOpaqueThingInstanceRenderWithShadow(m_lpCharacterShadowMapTexture));
```

---

### 5. AttributeInstance (if IsHeightData() is missing)

**File:** `client source 26.11/src/GameLib/AttributeInstance.cpp`

```cpp
bool CAttributeInstance::IsHeightData() const
{
	if (!m_pAttributeData)
		return false;
	
	return m_pAttributeData->IsHeightData();
}
```

---

## Behavior

**Shadow Receiving:**
- isHeight objects: Receive shadows
- Normal buildings: Do not receive shadows

**Shadow Casting:**
- isHeight objects: Do not cast shadows
- Normal buildings: Cast shadows

---

 

Missing m_pAttributeData, tried to change with m_roAttributeData but i get:
'IsHeightData': is not a member of 'CAttributeData'
binary '!': no operator found which takes a left-hand operand of type 'const CAttributeData::TRef' (or there is no acceptable conversion)

 

please give full tutorial

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Active+ Member
14 hours ago, muiekanzidor said:

Missing m_pAttributeData, tried to change with m_roAttributeData but i get:
'IsHeightData': is not a member of 'CAttributeData'
binary '!': no operator found which takes a left-hand operand of type 'const CAttributeData::TRef' (or there is no acceptable conversion)

 

please give full tutorial

 

 

EterLib/AttributeData.cpp

bool CAttributeData::IsHeightData() const
{
	return !m_HeightDataVector.empty();
}

 

don't forget to add it to the .h too, public ofc.

I don’t know — I think.

 

Discord

 

On 12/20/2025 at 12:16 PM, CONTROL said:

 

 

EterLib/AttributeData.cpp

bool CAttributeData::IsHeightData() const
{
	return !m_HeightDataVector.empty();
}

 

don't forget to add it to the .h too, public ofc.

Still get binary '!': no operator found which takes a left-hand operand of type 'const CAttributeData::TRef' (or there is no acceptable conversion)

with this:
m_roAttributeData

  • Active+ Member
21 minutes ago, muiekanzidor said:

Still get binary '!': no operator found which takes a left-hand operand of type 'const CAttributeData::TRef' (or there is no acceptable conversion)

with this:
m_roAttributeData

 

if (!m_roAttributeData) -> if (m_roAttributeData.IsNull())

or if you prefer if (!ref) syntax, update your Ref.h to add

	operator bool() const // compatible with C++98 / C++03 i guess
	{
		return m_pObject != NULL;
	}

 

I don’t know — I think.

 

Discord

 

23 minutes ago, CONTROL said:

 

if (!m_roAttributeData) -> if (m_roAttributeData.IsNull())

or if you prefer if (!ref) syntax, update your Ref.h to add

	operator bool() const // compatible with C++98 / C++03 i guess
	{
		return m_pObject != NULL;
	}

 

compiled sucessfully, but nothing changed - the bridge still has issues.

  • Good 1
  • Active+ Member
26 minutes ago, muiekanzidor said:

compiled sucessfully, but nothing changed - the bridge still has issues.

remove this (fix) if you add it

	if (CGraphicThingInstance* ti = dynamic_cast<CGraphicThingInstance*>(pInstance))
	{
		if (ti->IsObjectHeight())
			return;
	}

 

Edited by CONTROL

I don’t know — I think.

 

Discord

 

1 minute ago, CONTROL said:

remove this (fix) if you add it

	if (CGraphicThingInstance* ti = dynamic_cast<CGraphicThingInstance*>(pInstance))
	{
		if (ti->IsObjectHeight())
			return;
	}

 

Removed it and it acts like before the fix, the whole bridge gets dark..

  • Active+ Member
14 minutes ago, muiekanzidor said:

Removed it and it acts like before the fix, the whole bridge gets dark..

you've done something worng or forgot something have you replaced the old 

CMapOutdoor_FOpaqueThingInstanceRender

with 

CMapOutdoor_FOpaqueThingInstanceRenderWithShadow

 

I don’t know — I think.

 

Discord

 

28 minutes ago, CONTROL said:

you've done something worng or forgot something have you replaced the old 

CMapOutdoor_FOpaqueThingInstanceRender

with 

CMapOutdoor_FOpaqueThingInstanceRenderWithShadow

 

Yes I did, still no luck.. followed the tutorial exactly.

 

  • Good 1
  • 2 weeks later...
  • 2 weeks later...
  • 6 months later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.