mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Replaced expresser cases involving CBaseMultiplayerPlayer with CBasePlayer to allow singleplayer expressers to be obtained
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user