* fix brush shader names handling by bobtoolz (was writting empty shader name = crash on map save, at least "textures/" is expected)

complain about patch and brush shader names harder
This commit is contained in:
Garux 2018-12-21 14:45:12 +03:00
parent 9186d18353
commit 4dc9b18f70
3 changed files with 5 additions and 2 deletions

View File

@ -55,6 +55,8 @@ DPlane::DPlane( const vec3_t va, const vec3_t vb, const vec3_t vc, const _QERFac
else{ else{
FillDefaultTexture( &texInfo, points[0], points[1], points[2], "textures/common/caulk" ); FillDefaultTexture( &texInfo, points[0], points[1], points[2], "textures/common/caulk" );
} }
m_shader = texInfo.m_shader;
} }
DPlane::~DPlane(){ DPlane::~DPlane(){
@ -262,6 +264,7 @@ DPlane::DPlane( const vec3_t va, const vec3_t vb, const vec3_t vc, const char* t
m_bChkOk = true; m_bChkOk = true;
FillDefaultTexture( &texInfo, points[0], points[1], points[2], textureName ); FillDefaultTexture( &texInfo, points[0], points[1], points[2], textureName );
m_shader = texInfo.m_shader;
if ( bDetail ) { if ( bDetail ) {
texInfo.contents |= FACE_DETAIL; texInfo.contents |= FACE_DETAIL;
} }

View File

@ -270,7 +270,7 @@ inline bool check_plane_is_integer( const PlanePoints& planePoints ){
} }
inline void brush_check_shader( const char* name ){ inline void brush_check_shader( const char* name ){
if ( !shader_valid( name ) ) { if ( !texdef_name_valid( name ) ) {
globalErrorStream() << "brush face has invalid texture name: '" << name << "'\n"; globalErrorStream() << "brush face has invalid texture name: '" << name << "'\n";
} }
} }

View File

@ -994,7 +994,7 @@ void releaseShader(){
} }
void check_shader(){ void check_shader(){
if ( !shader_valid( GetShader() ) ) { if ( !texdef_name_valid( GetShader() ) ) {
globalErrorStream() << "patch has invalid texture name: '" << GetShader() << "'\n"; globalErrorStream() << "patch has invalid texture name: '" << GetShader() << "'\n";
} }
} }