Skip to content

Commit

Permalink
Creates Delay in CSGO Slaying
Browse files Browse the repository at this point in the history
Creates a one frame delay in CS:GO slaying called when someone wins an LR or someone rebels during an LR. Potential fix to server crashes.
  • Loading branch information
data-bomb committed Sep 23, 2017
1 parent 22dfc97 commit 8738ccf
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions addons/sourcemod/scripting/hosties/lastrequest.sp
Expand Up @@ -5982,7 +5982,14 @@ void DecideRebelsFate(int rebeller, int LRIndex, int victim = 0)
{
if (IsPlayerAlive(rebeller))
{
ForcePlayerSuicide(rebeller);
if (g_Game == Game_CSGO)
{
CreateTimer(0.0, Timer_SafeSlay, rebeller, TIMER_FLAG_NO_MAPCHANGE);
}
else
{
ForcePlayerSuicide(rebeller);
}
}
if (victim == 0)
{
Expand All @@ -6000,6 +6007,11 @@ void DecideRebelsFate(int rebeller, int LRIndex, int victim = 0)
}
}

public Action Timer_SafeSlay(Handle timer, any client)
{
ForcePlayerSuicide(client);
}

public Action Timer_BeerGoggles(Handle timer)
{
int timerCount = 1;
Expand Down Expand Up @@ -6066,7 +6078,15 @@ public Action Timer_BeerGoggles(Handle timer)

void KillAndReward(int loser, int victor)
{
ForcePlayerSuicide(loser);
if (g_Game == Game_CSGO)
{
CreateTimer(0.0, Timer_SafeSlay, loser, TIMER_FLAG_NO_MAPCHANGE);
}
else
{
ForcePlayerSuicide(loser);
}

if (IsClientInGame(victor))
{
if (g_Game == Game_CSS)
Expand Down

0 comments on commit 8738ccf

Please sign in to comment.