Skip to content

Commit

Permalink
Godframes Control: Remove glow if no godframes added (#713)
Browse files Browse the repository at this point in the history
【团结杯 单循环积分赛 5MO vs Welcome to osu!】 【精准空降到 54:57】 https://www.bilibili.com/video/BV16z4y1F7EF/?share_source=copy_web&vd_source=f80ca4a66aa762100701677bc8a0c4a8&t=3297

Fix:
- Fixed godframe glow persisting after setting 0.0s godframe.
  • Loading branch information
jensewe authored Nov 28, 2023
1 parent 6d04418 commit a5f282c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Binary file not shown.
17 changes: 12 additions & 5 deletions addons/sourcemod/scripting/l4d2_godframes_control_merge.sp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public Plugin myinfo =
{
name = "L4D2 Godframes Control combined with FF Plugins",
author = "Stabby, CircleSquared, Tabun, Visor, dcx, Sir, Spoon, A1m`, Sir",
version = "0.6.9",
version = "0.6.10",
description = "Allows for control of what gets godframed and what doesnt along with integrated FF Support from l4d2_survivor_ff (by dcx and Visor) and l4d2_shotgun_ff (by Visor)"
};

Expand Down Expand Up @@ -1028,16 +1028,23 @@ public int Native_GiveClientGodFrames(Handle hPlugin, int iNumParams)

void SetGodFrameGlows(int client)
{
if (g_hTimer[client])
delete g_hTimer[client];

float fNow = GetGameTime();
if (g_fFakeGodframeEnd[client] > fNow && g_hGodframeGlows.BoolValue)

if (g_fFakeGodframeEnd[client] <= fNow)
{
Timed_ResetGlow(null, client);
return;
}

if (g_hGodframeGlows.BoolValue)
{
// make player transparent/red while godframed
SetEntityRenderMode(client, RENDER_GLOW);
SetEntityRenderColor(client, 255, 0, 0, 200);

if (g_hTimer[client] != null)
delete g_hTimer[client];

g_hTimer[client] = CreateTimer(g_fFakeGodframeEnd[client] - fNow, Timed_ResetGlow, client);
}
}

0 comments on commit a5f282c

Please sign in to comment.