Permalink
Browse files

Fix #238

  • Loading branch information...
Bara committed Nov 29, 2017
1 parent 12cd744 commit 5292e041bc6292052052d27b592b0e1e7f307c2e
Showing with 17 additions and 8 deletions.
  1. +17 −8 addons/sourcemod/scripting/ttt/ttt_decoy_body.sp
@@ -135,18 +135,27 @@ public Action TTT_OnItemPurchased(int client, const char[] itemshort, bool count
public Action TTT_OnBodyChecked(int client, int[] ragdoll)
{
int attacker = GetClientOfUserId(ragdoll[Victim]);
bool bReal = false;
int attacker = -1;
if (!StrEqual(ragdoll[AttackerName], "Fake!", false))
{
bReal = true;
}
if (!bReal)
{
attacker = GetClientOfUserId(ragdoll[Victim]);
}
else
{
attacker = GetClientOfUserId(ragdoll[Attacker]);
}
int body = EntRefToEntIndex(ragdoll[Ent]);
if (TTT_IsClientValid(attacker) && g_bDecoyBody[attacker] && IsValidEntity(body))
{
bool bReal = false;
if (!StrEqual(ragdoll[AttackerName], "Fake!", false))
{
bReal = true;
}
if (!g_cRealBody.BoolValue && bReal)
{
return Plugin_Continue;

0 comments on commit 5292e04

Please sign in to comment.