From 6dc6f21202599fba3f371fadd612747402776f5f Mon Sep 17 00:00:00 2001 From: Ketmar Dark Date: Fri, 15 Apr 2016 13:37:28 +0300 Subject: [PATCH] added "SFSFastMode" hidden option; turned on by default --- src/game/g_options.pas | 5 ++++- src/shared/WADEDITOR.pas | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/game/g_options.pas b/src/game/g_options.pas index 54ea920..bbaa043 100644 --- a/src/game/g_options.pas +++ b/src/game/g_options.pas @@ -95,6 +95,7 @@ var gsSDLSampleRate: Integer = 44100; gsSDLBufferSize: Integer = 2048; gSFSDebug: Boolean = False; + gSFSFastMode: Boolean = True; implementation @@ -332,7 +333,8 @@ begin gShowMessages := config.ReadBool('Game', 'Messages', True); gRevertPlayers := config.ReadBool('Game', 'RevertPlayers', False); gChatBubble := Min(Max(config.ReadInt('Game', 'ChatBubble', 4), 0), 4); - gSFSDebug := config.ReadBool('Game', 'gSFSDebug', False); + gSFSDebug := config.ReadBool('Game', 'SFSDebug', False); + gSFSFastMode := config.ReadBool('Game', 'SFSFastMode', True); // Ãåéìïëåé â ñâîåé èãðå gcMap := config.ReadStr('GameplayCustom', 'Map', ''); @@ -535,6 +537,7 @@ begin config.WriteBool('Game', 'RevertPlayers', gRevertPlayers); config.WriteInt('Game', 'ChatBubble', gChatBubble); config.WriteBool('Game', 'SFSDebug', gSFSDebug); + config.WriteBool('Game', 'SFSFastMode', gSFSFastMode); config.WriteStr ('GameplayCustom', 'Map', gcMap); config.WriteStr ('GameplayCustom', 'GameMode', gcGameMode); diff --git a/src/shared/WADEDITOR.pas b/src/shared/WADEDITOR.pas index ac9e747..5c9ca4f 100644 --- a/src/shared/WADEDITOR.pas +++ b/src/shared/WADEDITOR.pas @@ -275,7 +275,14 @@ begin // cache this wad rfn := path+rfn; try - if not SFSAddDataFile(rfn) then exit; + if gSFSFastMode then + begin + if not SFSAddDataFile(rfn, true) then exit; + end + else + begin + if not SFSAddDataFileTemp(rfn, true) then exit; + end; except exit; end; @@ -324,7 +331,7 @@ begin try st := TSFSMemoryStreamRO.Create(Data, Len); - if not SFSAddSubDataFile(fn, st) then + if not SFSAddSubDataFile(fn, st, true) then begin st.Free; Exit; -- 2.29.2