Skip to content

Commit

Permalink
fix teamporter
Browse files Browse the repository at this point in the history
  • Loading branch information
higps committed Mar 13, 2024
1 parent a1fa2b0 commit e53d30f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
11 changes: 8 additions & 3 deletions berobot_dmg_handler.sp
Original file line number Diff line number Diff line change
Expand Up @@ -580,14 +580,14 @@ public Action TF2_OnTakeDamage(int victim, int &attacker, int &inflictor, float
TFTeam iTeam = view_as<TFTeam>(GetEntProp(victim, Prop_Send, "m_iTeamNum"));
// int attackerID = GetClientUserId(attacker);
// int victimID = GetClientUserId(victim);
TFClassType iClassVictim = TF2_GetPlayerClass(victim);
// TFClassType iClassVictim = TF2_GetPlayerClass(victim);

//TF2_DisguisePlayer(attackerID, iTeam, iClassVictim, victimID);
DataPack info = new DataPack();
info.Reset();
info.WriteCell(GetClientUserId(attacker));
info.WriteCell(iTeam);
info.WriteCell(iClassVictim);
info.WriteCell(TFClass_Spy);
info.WriteCell(GetClientUserId(victim));

RequestFrame(Disguiseframe, info);
Expand Down Expand Up @@ -1770,7 +1770,12 @@ public Action Event_post_inventory_application(Event event, const char[] name, b

if (IsSpycicle(Weapon3))
{
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Spycicle:{orange}On Backstab: Slows enemy attack speed by -%0.0f%%%% for %0.0f seconds",chat_display, LessIsMore(g_spycicle_fire_speed_debuff), g_spycicle_fire_Speed_debuff_duration);
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Spycicle: {orange}On Backstab: Slows enemy attack speed by -%0.0f%%%% for %0.0f seconds",chat_display, LessIsMore(g_spycicle_fire_speed_debuff), g_spycicle_fire_Speed_debuff_duration);
}

if (IsYer(Weapon3))
{
Format(chat_display, sizeof(chat_display), "%s\n{teamcolor}Your Eternal Reward: {orange}On Backstab: Disguise as enemy spy",chat_display);
}

if (IsEnforcer(Weapon1))
Expand Down
2 changes: 1 addition & 1 deletion cfg/robots/free_tank_demoman_executer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{
"killstreak tier" "1.0"
"dmg penalty vs players" "2.5"
"melee range multiplier" "1.25"
"melee range multiplier" "1.15"
"dmg penalty vs buildings" "0.35"
}
"custom_attributes_weapon"
Expand Down
8 changes: 7 additions & 1 deletion mm_attribute_teamporter.sp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public Action OnPlayerSpawn(Event event, const char[] name, bool dontBroadcast)

return Plugin_Continue;
}
// bool g_b_CanGetTeled[MAXPLAYERS + 1];
bool g_b_touching_spawn[MAXPLAYERS + 1];

public Action OnTouch(int client, int ent)
{
Expand All @@ -465,6 +465,7 @@ public Action OnTouch(int client, int ent)
DrawHUD(client);
// PrintCenterText(client, "Touching Spawn Robo");
// g_b_CanGetTeled[client] = true;
g_b_touching_spawn[client] = true;
}
else if (!IsAnyRobot(client) && TF2_GetPlayerClass(client) == TFClass_Spy)
{
Expand All @@ -474,13 +475,18 @@ public Action OnTouch(int client, int ent)
{
UpdateCharge(client);
DrawHUD(client);
g_b_touching_spawn[client] = true;
// PrintCenterText(client, "Touching Enemy Spawn Spy");
// g_b_CanGetTeled[client] = true;
}
}



}
else
{
g_b_touching_spawn[client] = false;
}
}
return Plugin_Continue;
Expand Down

0 comments on commit e53d30f

Please sign in to comment.