Skip to content

Commit 6d19cb4

Browse files
committed
Fixed regression with Workshop save loading
1 parent a06cf69 commit 6d19cb4

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • garrysmod/gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenttypes

garrysmod/gamemodes/sandbox/gamemode/spawnmenu/creationmenu/content/contenttypes/saves.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,18 @@ spawnmenu.AddCreationTab( "#spawnmenu.category.saves", function()
5454

5555
function ws_save:Load( filename )
5656

57+
-- Early out for workshop saves
58+
if ( string.StartsWith( filename, "content/4000" ) ) then
59+
RunConsoleCommand( "gm_load", filename )
60+
return
61+
end
62+
5763
local saveFile = file.Open( filename, "rb", "GAME" )
64+
if ( !saveFile ) then -- Somehow the file doesn't exist?
65+
RunConsoleCommand( "gm_load", filename )
66+
return
67+
end
68+
5869
saveFile:Seek( 4 )
5970
local mapFile = saveFile:ReadLine():TrimRight( "\n" )
6071

0 commit comments

Comments
 (0)