Skip to content

Commit

Permalink
权限更新
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasylidong committed Mar 20, 2024
1 parent 0ebe292 commit 7cdc9a1
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 34 deletions.
Binary file modified addons/sourcemod/plugins/extend/l4d_stats.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/extend/rygive.smx
Binary file not shown.
Binary file modified addons/sourcemod/plugins/funcommands.smx
Binary file not shown.
90 changes: 59 additions & 31 deletions addons/sourcemod/scripting/extend/l4d_stats.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4295,6 +4295,16 @@ public Action:event_CampaignWin(Handle:event, const String:name[], bool:dontBroa
CampaignOver = true;

StopMapTiming();
if (!MapTimingEnabled() || MapTimingStartTime <= 0.0)
{
return;
}
new Float:TotalTime = GetEngineTime() - MapTimingStartTime;
if(TotalTime < 30.0)
{
StatsPrintToChatAll("记录时间小于30s,数据应该不对,没有分数奖励!(PS: 30s能完成的图算啥图)");
return;
}

if (CurrentGamemodeID == GAMEMODE_SCAVENGE ||
CurrentGamemodeID == GAMEMODE_SURVIVAL)
Expand Down Expand Up @@ -4338,6 +4348,38 @@ public Action:event_CampaignWin(Handle:event, const String:name[], bool:dontBroa
}
}

if((AnneMultiPlayerMode() || SinglePlayerMode())){
if((g_brpgAvailable && !L4D_RPG_GetGlobalValue(INDEX_VALID)) || !IsThisRoundValid())
{
Score = RoundToFloor(Score * 0.4);
}
else
{
int inf= GetAnneInfectedNumber();
if(inf < 4)
{
if(AnneMultiPlayerMode())
Score = RoundToFloor(Score * (1 - (4 - inf) * 0.2));
}
else if(inf > 4)
Score = RoundToFloor(Score + Score * (inf - 4) * 0.1);
else if(inf > 6)
Score = RoundToFloor(Score + Score * (inf - 4) * 0.2);
else if(inf>8)
Score = RoundToFloor(Score + Score * (inf-4)*0.3);
}
}

if(IsAboveFourPeople())
{
Score = RoundToFloor(Score * (4.0 / getSurvivorNum()));
}

if(IsGaoJiRenJiEnabled())
{
Score = RoundToFloor(Score * 0.5);
}

new maxplayers = MaxClients;
for (new i = 1; i <= maxplayers; i++)
{
Expand Down Expand Up @@ -4370,37 +4412,6 @@ public Action:event_CampaignWin(Handle:event, const String:name[], bool:dontBroa
}
}
}
if((AnneMultiPlayerMode() || SinglePlayerMode())){
if((g_brpgAvailable && !L4D_RPG_GetGlobalValue(INDEX_VALID)) || !IsThisRoundValid())
{
Score = RoundToFloor(Score * 0.4);
}
else
{
int inf= GetAnneInfectedNumber();
if(inf < 4)
{
if(AnneMultiPlayerMode())
Score = RoundToFloor(Score * (1 - (4 - inf) * 0.2));
}
else if(inf > 4)
Score = RoundToFloor(Score + Score * (inf - 4) * 0.1);
else if(inf > 6)
Score = RoundToFloor(Score + Score * (inf - 4) * 0.2);
else if(inf>8)
Score = RoundToFloor(Score + Score * (inf-4)*0.3);
}
}

if(IsAboveFourPeople())
{
Score = RoundToFloor(Score * (4.0 / getSurvivorNum()));
}

if(IsGaoJiRenJiEnabled())
{
Score = RoundToFloor(Score * 0.5);
}

if (Mode && Score > 0)
{
Expand Down Expand Up @@ -9738,6 +9749,17 @@ public CheckSurvivorsWin()
decl String:UpdatePoints[32], String:UpdatePointsPenalty[32];
new ClientTeam, bool:NegativeScore = GetConVarBool(cvar_EnableNegativeScore);

if (!MapTimingEnabled() || MapTimingStartTime <= 0.0)
{
return;
}
new Float:TotalTime = GetEngineTime() - MapTimingStartTime;
if(TotalTime < 30.0)
{
StatsPrintToChatAll("记录时间小于30s,数据应该不对,没有分数奖励!(PS: 30s能完成的图算啥图)");
return;
}

switch (CurrentGamemodeID)
{
case GAMEMODE_VERSUS:
Expand Down Expand Up @@ -11178,6 +11200,12 @@ public StopMapTiming()
}

new Float:TotalTime = GetEngineTime() - MapTimingStartTime;
if(TotalTime < 30.0)
{
StatsPrintToChatAll("记录时间小于30s,数据应该不对,没有分数奖励!(PS: 30s能完成的图算啥图)");
return;
}

MapTimingStartTime = -1.0;
MapTimingBlocked = true;

Expand Down
3 changes: 2 additions & 1 deletion addons/sourcemod/scripting/extend/rygive.sp
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,8 @@ void Miscell(int client, int item) {
menu.AddItem("i", "处死所有特感");
if(GetClientImmunityLevel(client) > 90)
menu.AddItem("j", "特感控制免疫");
menu.AddItem("k", "处死所有生还");
if(GetClientImmunityLevel(client) > 90)
menu.AddItem("k", "处死所有生还");
if(GetClientImmunityLevel(client) >= 90)
menu.AddItem("l", "传送所有生还到起点");
if(GetClientImmunityLevel(client) > 99)
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/sourcemod/funcommands.sp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public void OnAdminMenuReady(Handle aTopMenu)
hTopMenu.AddItem("sm_freezebomb", AdminMenu_FreezeBomb, player_commands, "sm_freezebomb", ADMFLAG_SLAY);
hTopMenu.AddItem("sm_gravity", AdminMenu_Gravity, player_commands, "sm_gravity", ADMFLAG_SLAY);
hTopMenu.AddItem("sm_blind", AdminMenu_Blind, player_commands, "sm_blind", ADMFLAG_SLAY);
hTopMenu.AddItem("sm_noclip", AdminMenu_NoClip, player_commands, "sm_noclip", ADMFLAG_SLAY);
hTopMenu.AddItem("sm_noclip", AdminMenu_NoClip, player_commands, "sm_noclip", ADMFLAG_ROOT);
hTopMenu.AddItem("sm_drug", AdminMenu_Drug, player_commands, "sm_drug", ADMFLAG_SLAY);
}
}
Expand Down
2 changes: 1 addition & 1 deletion cfg/cfgogl/annehappy/confogl_plugins.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ sm_cvar ai_Tank_Bhop 1
sm_cvar AnnePluginVersion 2023-01
sm_cvar inf_EnableAutoSpawnTime 1 //是否开启自动设置增加时间
sm_cvar versus_round_restarttimer 2
sm_cvar versus_round_restarttimer_finale 2
sm_cvar versus_round_restarttimer_finale 5
exec vote/hard_off.cfg
exec vote/crouch_off.sh

Expand Down

0 comments on commit 7cdc9a1

Please sign in to comment.