mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-12 05:22:55 +00:00
Fix monsters precache with custom sound folders via monstermaker.
This commit is contained in:
parent
c4a7dcb139
commit
820a33f278
@ -151,7 +151,29 @@ void CMonsterMaker::Precache( void )
|
|||||||
{
|
{
|
||||||
CBaseMonster::Precache();
|
CBaseMonster::Precache();
|
||||||
|
|
||||||
UTIL_PrecacheOther( STRING( m_iszMonsterClassname ) );
|
if( pev->message )
|
||||||
|
{
|
||||||
|
edict_t *pent;
|
||||||
|
|
||||||
|
pent = CREATE_NAMED_ENTITY( m_iszMonsterClassname );
|
||||||
|
|
||||||
|
if( FNullEnt( pent ) )
|
||||||
|
{
|
||||||
|
ALERT( at_console, "NULL Ent in UTIL_PrecacheOther\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
CBaseEntity *pEntity = CBaseEntity::Instance( VARS( pent ) );
|
||||||
|
|
||||||
|
pEntity->pev->message = pev->message;
|
||||||
|
|
||||||
|
if( pEntity )
|
||||||
|
pEntity->Precache();
|
||||||
|
|
||||||
|
REMOVE_ENTITY( pent );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
UTIL_PrecacheOther( STRING( m_iszMonsterClassname ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=========================================================
|
//=========================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user