mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-10 03:51:28 +00:00
Oops, actually implement the HL2MP fake client
This commit is contained in:
parent
2acac6cc96
commit
4ef7dde5c7
1 changed files with 13 additions and 0 deletions
|
@ -1690,6 +1690,19 @@ static HSCRIPT Script_CreateFakeClient( const char* pszName = NULL, int iTeam =
|
|||
|
||||
CBasePlayer* pBot = BotPutInServer( false, false, iTeam, iClass, pszName );
|
||||
return ToHScript( pBot );
|
||||
#elif HL2MP
|
||||
edict_t *pEdict = engine->CreateFakeClient(pszName);
|
||||
if (!pEdict)
|
||||
{
|
||||
Msg( "Failed to create Bot.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CHL2MP_Player *pPlayer = ((CHL2MP_Player *)CHL2MP_Player::Instance( pEdict ));
|
||||
pPlayer->ClearFlags();
|
||||
pPlayer->AddFlag( FL_CLIENT | FL_FAKECLIENT );
|
||||
|
||||
return ToHScript( pPlayer );
|
||||
#else
|
||||
// Dummy implementation
|
||||
/*edict_t *pEdict = engine->CreateFakeClient(pszName);
|
||||
|
|
Loading…
Reference in a new issue