mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-23 10:12:59 +00:00
Fixed some wrong texture projections with convertMapToValve220
This commit is contained in:
parent
92c5cbf758
commit
da947328f0
1 changed files with 25 additions and 1 deletions
|
@ -247,8 +247,32 @@ idImage* idMaterial::GetEditorImage() const
|
|||
else
|
||||
{
|
||||
// look for an explicit one
|
||||
// RB: changed to TD_DIFFUSE because BFG didn't ship the editor images
|
||||
// RB: changed to TD_DIFFUSE because BFG didn't ship the editor images and
|
||||
// the qer_editorImage might be the same as the diffusemap
|
||||
editorImage = globalImages->ImageFromFile( editorImageName, TF_DEFAULT, TR_REPEAT, TD_DIFFUSE );
|
||||
|
||||
// look for the diffusemap alternative like TrenchBroom does
|
||||
// this is required to have the texture dimensions for the convertMapToValve220 cmd
|
||||
if( editorImage && editorImage->IsLoaded() && editorImage->IsDefaulted() )
|
||||
{
|
||||
// _D3XP :: First check for a diffuse image, then use the first
|
||||
if( numStages && stages )
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < numStages; i++ )
|
||||
{
|
||||
if( stages[i].lighting == SL_DIFFUSE )
|
||||
{
|
||||
editorImage = stages[i].texture.image;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !editorImage )
|
||||
{
|
||||
editorImage = stages[0].texture.image;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !editorImage )
|
||||
|
|
Loading…
Reference in a new issue