- fixed a bug where sdktools did not filter @aim properly (:. immunity was ignored)
- fixed a bug where sdktools did not check to see if g_pBinTools was valid before using it --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401763
This commit is contained in:
parent
3dd4c767c1
commit
b569bd8f97
@ -195,6 +195,11 @@ void SDKTools::SDK_OnAllLoaded()
|
||||
{
|
||||
SM_GET_LATE_IFACE(BINTOOLS, g_pBinTools);
|
||||
|
||||
if (!g_pBinTools)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
g_TEManager.Initialize();
|
||||
s_TempEntHooks.Initialize();
|
||||
s_SoundHooks.Initialize();
|
||||
@ -293,11 +298,20 @@ bool SDKTools::ProcessCommandTarget(cmd_target_info_t *info)
|
||||
int player_index;
|
||||
if ((player_index = GetClientAimTarget(pAdmin->GetEdict(), true)) < 1)
|
||||
{
|
||||
return false;
|
||||
info->reason = COMMAND_TARGET_NONE;
|
||||
info->num_targets = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
IGamePlayer *pTarget = playerhelpers->GetGamePlayer(info->admin);
|
||||
|
||||
info->reason = playerhelpers->FilterCommandTarget(pAdmin, pTarget, info->flags);
|
||||
if (info->reason != COMMAND_TARGET_VALID)
|
||||
{
|
||||
info->num_targets = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
info->targets[0] = player_index;
|
||||
info->num_targets = 1;
|
||||
info->reason = COMMAND_TARGET_VALID;
|
||||
|
Loading…
Reference in New Issue
Block a user