in .def ent defs treat -, x & unused* spawnflags as dummy

#150
This commit is contained in:
Garux 2023-09-19 17:03:35 +06:00
parent 4cbe05a25c
commit 3eff56211d
2 changed files with 6 additions and 1 deletions

View File

@ -268,6 +268,11 @@ EntityClass *Eclass_InitFromText( const char *text ){
if ( !p ) {
break;
}
if( string_equal( Get_COM_Token(), "-" )
|| string_equal( Get_COM_Token(), "x" )
|| string_equal_prefix_nocase( Get_COM_Token(), "unused" ) ){
continue;
}
strncpy( e->flagnames[i], Get_COM_Token(), std::size( e->flagnames[i] ) - 1 );
}
}

View File

@ -856,7 +856,7 @@ void SpawnFlags_setEntityClass( EntityClass* eclass ){
// do a first pass to count the spawn flags, don't touch the widgets, we don't know in what state they are
for ( int i = 0; i < MAX_FLAGS; i++ )
{
if ( eclass->flagnames[i][0] != 0 && strcmp( eclass->flagnames[i], "-" ) ) {
if ( !string_empty( eclass->flagnames[i] ) ) {
spawn_table[g_spawnflag_count++] = i;
}
// hide all boxes