Fix entvars keyvalues not working.

Fix monstermaker classname.
This commit is contained in:
Giegue
2023-03-25 21:46:22 -03:00
parent b757c65345
commit c813f6e76a
3 changed files with 3 additions and 11 deletions

View File

@@ -111,11 +111,7 @@ void CMBaseEntity :: KeyValue( KeyValueData* pkvd )
if ( !pev || !pkvd )
return;
if ( pkvd->fHandled )
{
// only handled data contain readable strings
EntvarsKeyvalue( pev, pkvd );
}
EntvarsKeyvalue( pev, pkvd );
}
// give health

View File

@@ -109,6 +109,7 @@ void CMMonsterMaker :: Spawn( )
m_fFadeChildren = TRUE;
m_flGround = 0;
pev->classname = MAKE_STRING("monstermaker");
}
void CMMonsterMaker :: Precache( void )
@@ -169,7 +170,7 @@ void CMMonsterMaker::MakeMonster( void )
pent = spawn_monster(m_iMonsterIndex, pev->origin, pev->angles, createSF, keyvalue);
if ( pent == NULL )
{
ALERT ( at_console, "NULL Ent in MonsterMaker!\n" );
ALERT ( at_console, "[MONSTER] NULL Ent in MonsterMaker!\n" );
return;
}

View File

@@ -2626,11 +2626,6 @@ void CMBaseMonster :: KeyValue( KeyValueData *pkvd )
m_iClassifyOverride = atoi( pkvd->szValue );
pkvd->fHandled = TRUE;
}
else if (FStrEq(pkvd->szKeyName, "model"))
{
pev->model = ALLOC_STRING( pkvd->szValue );
pkvd->fHandled = TRUE;
}
else
{
CMBaseToggle::KeyValue( pkvd );