Skip to content

Commit

Permalink
Add compatibility to wld_RunWithTheWind console toggle for single p…
Browse files Browse the repository at this point in the history
…layer (FAForever#3653)

When the program argument `/RunWithTheWind` is the compatibility to enable it in single player remains. This is primarily a quality of life feature.
  • Loading branch information
Garanas authored Mar 8, 2022
1 parent ed42919 commit 8010018
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
3 changes: 2 additions & 1 deletion loc/RU/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9097,4 +9097,5 @@ lobui_0806="Да"
lobui_0807="Эта игра будет нерейтинговой."

replay_id="Ид повтора"
map_version="Версия карты"
map_version="Версия карты"

3 changes: 2 additions & 1 deletion loc/US/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8077,4 +8077,5 @@ lobui_0806="Yes"
lobui_0807="This game will not be rated."

replay_id="Replay id"
map_version="Map version"
map_version="Map version"

2 changes: 1 addition & 1 deletion lua/options/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ options = {
{text = "<LOC _MaxTech>", key = 'maxTech'},
},
},
}
},
},
},
ui = {
Expand Down
6 changes: 4 additions & 2 deletions lua/ui/game/gamemain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,12 @@ function CreateUI(isReplay)
import('/lua/ui/game/avatars.lua').ToggleAvatars(false)
AddBeatFunction(UiBeat)
else
-- check if we should reduce network delay / lag
local clients = GetSessionClients()
if table.getsize(clients) <= 1 then
-- No need for unnecessary lag when playing alone
ConExecute('net_lag 0')
if not HasCommandLineArg("/RunWithTheWind") then
ConExecute('net_lag 0')
end
end
end

Expand Down
5 changes: 3 additions & 2 deletions setup/bin/start_dev.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ForgedAlliance.exe /init "init_dev.lua" /EnableDiskWatch /showlog /log "dev.log"
ForgedAlliance.exe /init "init_dev.lua" /EnableDiskWatch /showlog /log "dev.log" /RunWithTheWind

REM /init Define what initialisation file to use
REM /EnableDiskWatch Allows the game to reload files when it sees they're changed on disk
REM /showlog Opens the moho log by default
REM /log Informs the game where to store the log
REM /log Informs the game where to store the log
REM /RunWithTheWind Ensures single player games are compatible with the console commander `wld_RunWithTheWind`
5 changes: 3 additions & 2 deletions setup/bin/start_dev.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#! /bin/sh

# arguments are not taken into account, does anyone know why?
./ForgedAlliance.exe "/init" "init_dev.lua" "/EnableDiskWatch" "/showlog" "/log" "dev.log"
./ForgedAlliance.exe "/init" "init_dev.lua" "/EnableDiskWatch" "/showlog" "/log" "dev.log" "/RunWithTheWind"

# /init Define what initialisation file to use
# /EnableDiskWatch Allows the game to reload files when it sees they're changed on disk
# /showlog Opens the moho log by default
# /log Informs the game where to store the log
# /log Informs the game where to store the log
# /RunWithTheWind Ensures single player games are compatible with the console commander `wld_RunWithTheWind`

0 comments on commit 8010018

Please sign in to comment.