Skip to content

Commit

Permalink
Freeday: Fixed shanapu#400 and small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
azalty committed Sep 18, 2022
1 parent e2da710 commit 64b42ba
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions addons/sourcemod/scripting/MyJailbreak/freeday.sp
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,12 @@ void StartEventRound(bool thisround)
if (!IsClientInGame(i))
continue;

SetEntProp(i, Prop_Data, "m_takedamage", 0, 1);
if (IsPlayerAlive(i))
{
SetEntProp(i, Prop_Data, "m_takedamage", 0, 1);

SetEntityMoveType(i, MOVETYPE_NONE);
SetEntityMoveType(i, MOVETYPE_NONE);
}
}

CreateTimer(3.0, Timer_PrepareEvent);
Expand Down Expand Up @@ -770,14 +773,21 @@ void PrepareDay()

CreateInfoPanel(i);

SetEntProp(i, Prop_Send, "m_CollisionGroup", 2); // 2 - none / 5 - 'default'

if (!gc_bdamage.BoolValue && IsValidClient(i))
if (IsPlayerAlive(i))
{
SetEntProp(i, Prop_Data, "m_takedamage", 0, 1);
}
SetEntProp(i, Prop_Send, "m_CollisionGroup", 2); // 2 - none / 5 - 'default'

if (!gc_bdamage.BoolValue)
{
SetEntProp(i, Prop_Data, "m_takedamage", 0, 1);
}
else
{
SetEntProp(i, Prop_Data, "m_takedamage", 1, 1);
}

SetEntityMoveType(i, MOVETYPE_WALK);
SetEntityMoveType(i, MOVETYPE_WALK);
}
}

if (gp_bMyJailbreak)
Expand Down

0 comments on commit 64b42ba

Please sign in to comment.