Skip to content

Commit

Permalink
Fixed issue with bugged Tanks
Browse files Browse the repository at this point in the history
  • Loading branch information
Psykotikism committed Feb 21, 2022
1 parent e4aa05b commit f2ba92d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Version 9.5 (February 20, 2022)

1. Bug fixes:

- Fixed issues where certain special infected cannot suicide because of the friendly-fire block. (Thanks to `WhatsAnName` for testing and reporting!)

## Version 9.0 (October 10, 2021)

1. Bug fixes:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ Outcome: The plugin works only in "coop" mode.
## Credits
**cravenge** - For the original source code; fixing all the errors and converting the original source code into the new syntax in this [post](https://forums.alliedmods.net/showthread.php?t=301873).

**Lux** - For the previous source code; showed me a better and simpler way of handling friendly fire.
**Lux/LuxLuma** - For the previous source code; showed me a better and simpler way of handling friendly fire.

**Silvers (Silvershot)** - For the code that allows users to enable/disable the plugin in certain game modes and for blocking damage after idle/spectator team change and player disconnects.

**Kr3m** - For reporting an issue.
**Kr3m, WhatsAnName** - For reporting an issue.

# Contact Me
If you wish to contact me for any questions, concerns, suggestions, or criticism, I can be found here:
Expand Down
Binary file modified addons/sourcemod/plugins/no_friendly-fire.smx
Binary file not shown.
4 changes: 2 additions & 2 deletions addons/sourcemod/scripting/no_friendly-fire.sp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#pragma semicolon 1
#pragma newdecls required

#define NFF_VERSION "9.0"
#define NFF_VERSION "9.5"

public Plugin myinfo =
{
Expand Down Expand Up @@ -225,7 +225,7 @@ Action OnTakePlayerDamage(int victim, int &attacker, int &inflictor, float &dama
}
else if (bIsValidClient(victim) && bIsValidClient(attacker) && GetClientTeam(victim) == GetClientTeam(attacker))
{
if (bIsDamageTypeBlocked(inflictor, damagetype) && (g_cvNFFSurvivors.BoolValue && GetClientTeam(victim) == 2 && GetClientTeam(attacker) == 2) || (g_cvNFFInfected.BoolValue && GetClientTeam(victim) == 3 && GetClientTeam(attacker) == 3))
if (bIsDamageTypeBlocked(inflictor, damagetype) && (g_cvNFFSurvivors.BoolValue && GetClientTeam(victim) == 2 && GetClientTeam(attacker) == 2) || (g_cvNFFInfected.BoolValue && attacker != victim && GetClientTeam(victim) == 3 && GetClientTeam(attacker) == 3))
{
return Plugin_Handled;
}
Expand Down

0 comments on commit f2ba92d

Please sign in to comment.