Re: [Tutorial] Add camuflage
Re: [Tutorial] Add camuflage
Quote:
Originally Posted by
facedev
From WarInc :) n1
but is commented on warz
after i work with war inc source i search in warz and found
Re: [Tutorial] Add camuflage
Quote:
Originally Posted by
erickstyle
but is commented on warz
after i work with war inc source i search in warz and found
I saw it commented in WarZ source once before but I leave it commented. A nice feature from WarInc, I don't know why they remove it from WarZ.
Re: [Tutorial] Add camuflage
Code:
000075.314| !!! ERROR: r3dTerrain3::GetDominantTexture: implement me!
Re: [Tutorial] Add camuflage
in Terrain3.cpp look for this and comment out the error and it works fine.
r3dTerrain3::GetDominantTexture( const r3dPoint3D &pos ) /*OVERRIDE*/
{
#if R3D_TERRAIN_V3_GRAPHICS
#if 0
const r3dTerrainDesc& desc = GetDesc();
int x = int( pos.x / desc.CellSize ) * m_DominantLayerData.Width() / desc.CellCountX;
int z = int( pos.z / desc.CellSize ) * m_DominantLayerData.Height() / desc.CellCountZ;
x = R3D_MAX( R3D_MIN( x, (int)m_DominantLayerData.Width() - 1 ), 0 );
z = R3D_MAX( R3D_MIN( z, (int)m_DominantLayerData.Height() - 1 ), 0 );
int domiLayer = m_DominantLayerData[ z ][ x ];
if( !domiLayer )
return m_BaseLayer.DiffuseTex;
else
{
if( domiLayer > 0 && domiLayer <= (int)m_Layers.Count() )
{
return m_Layers[ domiLayer - 1 ].DiffuseTex;
}
}
/*#else
r3dError( "r3dTerrain3::GetDominantTexture: implement me!" );*/
#endif
#endif
return NULL;
}
Credits @GetRekBambi for the help with this fix.
Re: [Tutorial] Add camuflage
Need to develop GetDominantTexture function for terrain 3