mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-26 05:37:58 +03:00
Replaced expresser cases involving CBaseMultiplayerPlayer with CBasePlayer to allow singleplayer expressers to be obtained
This commit is contained in:
parent
bec712f3f9
commit
1a6f1f0cab
@ -174,7 +174,11 @@ void CResponseQueue::RemoveExpresserHost(CBaseEntity *host)
|
||||
/// TODO: Kind of an ugly hack until I get the class hierarchy straightened out.
|
||||
static CAI_Expresser *InferExpresserFromBaseEntity(CBaseEntity * RESTRICT pEnt)
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
if ( CBasePlayer *pPlayer = ToBasePlayer(pEnt) )
|
||||
#else
|
||||
if ( CBaseMultiplayerPlayer *pPlayer = dynamic_cast<CBaseMultiplayerPlayer *>(pEnt) )
|
||||
#endif
|
||||
{
|
||||
return pPlayer->GetExpresser();
|
||||
}
|
||||
|
@ -4835,10 +4835,17 @@ void CSceneEntity::OnSceneFinished( bool canceled, bool fireoutput )
|
||||
CBaseFlex *pFlex = FindNamedActor( 0 ) ;
|
||||
if ( pFlex )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
CBasePlayer *pAsPlayer = ToBasePlayer(pFlex);
|
||||
#else
|
||||
CBaseMultiplayerPlayer *pAsPlayer = dynamic_cast<CBaseMultiplayerPlayer *>(pFlex);
|
||||
#endif
|
||||
if (pAsPlayer)
|
||||
{
|
||||
CAI_Expresser *pExpresser = pAsPlayer->GetExpresser();
|
||||
#ifdef MAPBASE
|
||||
if (pExpresser)
|
||||
#endif
|
||||
pExpresser->OnSpeechFinished();
|
||||
}
|
||||
else if ( CAI_BaseActor *pActor = dynamic_cast<CAI_BaseActor*>( pFlex ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user