- fixed wierd bracked position

This commit is contained in:
HarrievG 2021-05-24 00:23:29 +02:00 committed by Daniel Gibson
parent 99ca9f0543
commit 5ff3b0b9ee

View file

@ -1154,19 +1154,16 @@ void idGameEdit::MapEntityTranslate( const char *name, const idVec3 &v ) const {
***********************************************************************/ ***********************************************************************/
bool idGameEdit::IsLineCode(const char* filename, int linenumber) const bool idGameEdit::IsLineCode( const char *filename, int linenumber ) const {
{ static idStr fileStr = idStr( MAX_PATH );
static idStr fileStr = idStr(MAX_PATH); idProgram *program = &gameLocal.program;
idProgram* program = &gameLocal.program; for ( int i = 0; i < program->NumStatements( ); i++ ) {
for (int i = 0; i < program->NumStatements(); i++) fileStr = program->GetFilename( program->GetStatement( i ).file );
{ fileStr.BackSlashesToSlashes( );
fileStr = program->GetFilename(program->GetStatement(i).file);
fileStr.BackSlashesToSlashes();
if (strcmp(filename, fileStr.c_str()) == 0 if ( strcmp( filename, fileStr.c_str( ) ) == 0
&& program->GetStatement(i).linenumber == linenumber && program->GetStatement( i ).linenumber == linenumber
) ) {
{
return true; return true;
} }
} }