1.1 --- a/core/smn_halflife.cpp Mon May 13 14:19:17 2013 -0400
1.2 +++ b/core/smn_halflife.cpp Mon May 13 15:18:12 2013 -0400
1.3 @@ -102,6 +102,17 @@
1.4
1.5 pContext->LocalToString(params[1], &netname);
1.6
1.7 +#if SOURCE_ENGINE == SE_DOTA
1.8 + int index;
1.9 + engine->CreateFakeClient(&index, netname);
1.10 +
1.11 + if (index == -1)
1.12 + {
1.13 + return 0;
1.14 + }
1.15 +
1.16 + return index;
1.17 +#else
1.18 edict_t *pEdict = engine->CreateFakeClient(netname);
1.19
1.20 /* :TODO: does the engine fire forwards for us and whatnot? no idea... */
1.21 @@ -112,6 +123,7 @@
1.22 }
1.23
1.24 return IndexOfEdict(pEdict);
1.25 +#endif
1.26 }
1.27
1.28 static cell_t SetFakeClientConVar(IPluginContext *pContext, const cell_t *params)
1.29 @@ -138,7 +150,11 @@
1.30 pContext->LocalToString(params[2], &cvar);
1.31 pContext->LocalToString(params[3], &value);
1.32
1.33 +#if SOURCE_ENGINE == SE_DOTA
1.34 + engine->SetFakeClientConVarValue(pPlayer->GetIndex(), cvar, value);
1.35 +#else
1.36 engine->SetFakeClientConVarValue(pPlayer->GetEdict(), cvar, value);
1.37 +#endif
1.38
1.39 return 1;
1.40 }