1.1 --- a/extensions/sdktools/vnatives.cpp Sun Oct 21 20:06:30 2007 +0000
1.2 +++ b/extensions/sdktools/vnatives.cpp Sun Oct 21 20:09:28 2007 +0000
1.3 @@ -657,43 +657,6 @@
1.4 return engine->IndexOfEdict(pEdict);
1.5 }
1.6
1.7 -static cell_t IsPlayerAlive(IPluginContext *pContext, const cell_t *params)
1.8 -{
1.9 - IGamePlayer *player = playerhelpers->GetGamePlayer(params[1]);
1.10 - if (player == NULL)
1.11 - {
1.12 - return pContext->ThrowNativeError("Invalid client index %d", params[1]);
1.13 - }
1.14 - else if (!player->IsInGame())
1.15 - {
1.16 - return pContext->ThrowNativeError("Client %d is not in game", params[1]);
1.17 - }
1.18 -
1.19 - edict_t *pEdict = player->GetEdict();
1.20 - CBaseEntity *pEntity = pEdict->GetUnknown()->GetBaseEntity();
1.21 -
1.22 - static int lifeState_off = 0;
1.23 - static bool lifeState_setup = false;
1.24 -
1.25 - if (!lifeState_setup)
1.26 - {
1.27 - lifeState_setup = true;
1.28 - g_pGameConf->GetOffset("m_lifeState", &lifeState_off);
1.29 - }
1.30 -
1.31 - if (!lifeState_off)
1.32 - {
1.33 - IPlayerInfo *info = playerinfomngr->GetPlayerInfo(pEdict);
1.34 - if (info)
1.35 - {
1.36 - return info->IsDead() ? 0 : 1;
1.37 - }
1.38 -
1.39 - return pContext->ThrowNativeError("\"IsPlayerAlive\" not supported by this mod");
1.40 - }
1.41 - return (*((uint8_t *)pEntity + lifeState_off) == LIFE_ALIVE) ? 1 : 0;
1.42 -}
1.43 -
1.44 static cell_t CreateEntityByName(IPluginContext *pContext, const cell_t *params)
1.45 {
1.46 static ValveCall *pCall = NULL;
1.47 @@ -930,7 +893,6 @@
1.48 {"GetClientEyePosition", GetClientEyePosition},
1.49 {"GetClientEyeAngles", GetClientEyeAngles},
1.50 {"FindEntityByClassname", FindEntityByClassname},
1.51 - {"IsPlayerAlive", IsPlayerAlive},
1.52 {"CreateEntityByName", CreateEntityByName},
1.53 {"DispatchSpawn", DispatchSpawn},
1.54 {"DispatchKeyValue", DispatchKeyValue},