Skip to content

Commit

Permalink
Fix Critical Issue with Rage Gain [M]
Browse files Browse the repository at this point in the history
  • Loading branch information
Batfoxkid committed Mar 23, 2024
1 parent a435098 commit 7057bae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
26 changes: 15 additions & 11 deletions addons/sourcemod/scripting/freak_fortress_2/events.sp
Original file line number Diff line number Diff line change
Expand Up @@ -334,18 +334,22 @@ public Action Events_PlayerHurt(Event event, const char[] name, bool dontBroadca
if(Client(victim).IsBoss)
{
float rage = Client(victim).RageDamage;
float maxrage = Client(victim).RageMax;
if(rage > 0.0 && rage < maxrage)
if(rage > 0.0)
{
float debuff = Client(victim).RageDebuff;
if(debuff != 1.0)
Client(victim).RageDebuff = 1.0;

rage = Client(victim).GetCharge(0) + (damage * 100.0 * debuff / rage);
if(rage > maxrage)
rage = maxrage;

Client(victim).SetCharge(0, rage);
rage = Client(victim).GetCharge(0);
float maxrage = Client(victim).RageMax;
if(rage < maxrage)
{
float debuff = Client(victim).RageDebuff;
if(debuff != 1.0)
Client(victim).RageDebuff = 1.0;

rage += (damage * 100.0 * debuff / rage);
if(rage > maxrage)
rage = maxrage;

Client(victim).SetCharge(0, rage);
}
}

if(event.GetBool("minicrit") && event.GetBool("allseecrit"))
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/freak_fortress_2/gamemode.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ void Gamemode_PlayerRunCmd(int client, int buttons)
{
Client(client).OverlayFor = 0.0;

SetVariantString("");
SetVariantString(NULL_STRING);
AcceptEntityInput(client, "SetScriptOverlayMaterial", client, client);
}
}
Expand Down

0 comments on commit 7057bae

Please sign in to comment.