Skip to content

Commit

Permalink
Fix Server crash on ready after all players
Browse files Browse the repository at this point in the history
  • Loading branch information
TheR00st3r committed Jan 7, 2025
1 parent f8c65a0 commit ee8ed27
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion PugSharp.Tests/PugSharp.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.294" />
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.296" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="xunit" Version="2.9.2" />
Expand Down
2 changes: 1 addition & 1 deletion PugSharp/PugSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.294">
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.296">
<PrivateAssets>none</PrivateAssets>
<ExcludeAssets>runtime</ExcludeAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
38 changes: 19 additions & 19 deletions install-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ Invoke-WebRequest "https://mms.alliedmods.net/mmsdrop/2.0/$latestMM" -OutFile "$
Write-Output "Extract MetaMod Version $latestMM"
Expand-Archive "$TARGET_DIR\latestMM.zip" -DestinationPath $TARGET_DIR -Force

Write-Output "Fix GameInfo"
if (Test-Path $GAMEINFO_FILE) {
$NEW_ENTRY = " Game csgo/addons/metamod"
$SEL = Select-String -Path $GAMEINFO_FILE -Pattern $NEW_ENTRY
if ($SEL -ne $null) {
Write-Output "The entry '$NEW_ENTRY' already exists in $GAMEINFO_FILE. No changes were made."
}
else {
(Get-Content $GAMEINFO_FILE) |
Foreach-Object {
$_ # send the current line to output
if ($_ -match "Game_LowViolence") {
#Add Lines after the selected pattern
$NEW_ENTRY
}
} | Set-Content $GAMEINFO_FILE
# Write-Output "Fix GameInfo"
# if (Test-Path $GAMEINFO_FILE) {
# $NEW_ENTRY = " Game csgo/addons/metamod"
# $SEL = Select-String -Path $GAMEINFO_FILE -Pattern $NEW_ENTRY
# if ($SEL -ne $null) {
# Write-Output "The entry '$NEW_ENTRY' already exists in $GAMEINFO_FILE. No changes were made."
# }
# else {
# (Get-Content $GAMEINFO_FILE) |
# Foreach-Object {
# $_ # send the current line to output
# if ($_ -match "Game_LowViolence") {
# #Add Lines after the selected pattern
# $NEW_ENTRY
# }
# } | Set-Content $GAMEINFO_FILE

Write-Output "The file $GAMEINFO_FILE has been modified successfully. '$NEW_ENTRY' has been added."
}
}
# Write-Output "The file $GAMEINFO_FILE has been modified successfully. '$NEW_ENTRY' has been added."
# }
# }

Write-Output "Install CounterStrikeSharp"

Expand Down
1 change: 0 additions & 1 deletion resources/cfg/PugSharp/live.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ spec_freeze_time_lock 2
spec_replay_enable 0
sv_allow_votes 0
sv_auto_full_alltalk_during_warmup_half_end 0
sv_coaching_enabled 1
sv_competitive_official_5v5 1
sv_damage_print_enable 0
sv_deadtalk 1
Expand Down

0 comments on commit ee8ed27

Please sign in to comment.