50 Commits

Author SHA1 Message Date
Kawe Mazidjatari
359820615f Move low level code to tier0/tier1
Moved to tier0/tier1 so it could be compiled into a static library in the future.
2023-05-06 22:59:01 +02:00
Kawe Mazidjatari
de572f675c Fix launcher bug
No Queued Packets Thread has been renamed to Queued Packets Thread, and therefore its toggle should be inverted. Enabled by default.
2023-04-30 21:44:06 +02:00
Kawe Mazidjatari
0399d753f4 Properly toggle cvars in sdk launcher
Toggle them on or off instead of just on. Else disabling the toggle wouldn't disable then in the runtime as the default value of these cvars is '1'.
2023-04-25 00:47:44 +02:00
Kawe Mazidjatari
32d04645ca Put launcher playlists parsing code in try catch block
Avoid crash due to exceptions.
2023-04-03 18:38:20 +02:00
Kawe Mazidjatari
fee5f7608e Fix SDK launcher bug
Add missing argument for string format specifier. Fixed additional compiler warnings by casting types/commenting unused.
2023-04-03 13:12:22 +02:00
Kawe Mazidjatari
5aea2f4261 RCON system upgrade
RCON upgrade with additional logging system improvements:
* Netconsole's can now log received messages in color, even when the RCON server has ANSI colors disabled; logs are fully composed locally.
* RCON server now also sends the log type over the wire, along with the (already existing) context.
* SDK logging code is now shared with the standalone netconsole application.
* Improved logging readability for the standalone netconsole application.
2023-03-27 02:01:48 +02:00
Kawe Mazidjatari
13d9ba3e13 Save SDK Launcher state in settings file
Store the state of the SDK launcher (toggled/text options) to a file on the disk to persist state.
2023-03-24 00:10:48 +01:00
Kawe Mazidjatari
b169a78542 Force consistency within code
* Use C-style format specifiers everywhere.
* Use std::string as much as possible.
* Reorder CSurface class structure by groups.
* Light optimizations in 'CSurface::ForwardCommandToGame'.
2023-03-22 00:28:41 +01:00
Kawe Mazidjatari
8177707413 SDK Launcher light refactor
* Fixed bug causing command line interface not to work properly.
* Optimized warning text and instructions.
* Terminal will not be freed when compiled in Debug/Profile.
* The console will now forward the command to all game window instances.
2023-03-21 00:14:54 +01:00
Kawe Mazidjatari
6a8085f024 Rename UI class to 'CSurface' 2023-03-20 11:16:29 +01:00
Kawe Mazidjatari
7b2a5d5d12 Initial major launcher code refactor
* Removed most boilerplate/duplicate code from launcher API.
* Make launcher API more friendly for external usage.
2023-03-20 10:26:43 +01:00
Kawe Mazidjatari
8a95c956d5 Make launcher UI code compatible with older compilers
Make it compatible with older versions of the Visual Studio 2017 compiler.
2023-03-20 00:01:49 +01:00
Kawe Mazidjatari
180d762089 Fix SDK launcher bugs
Fixed bugs preventing the SDK launcher from working when compiled using the Visual Studio 2017 compiler.
2023-03-19 11:20:04 +01:00
Kawe Mazidjatari
46ddaf9b01 Add ability to deselect a map in the SDK launcher 2023-02-12 20:30:35 +01:00
Kawe Mazidjatari
3af4ccebc3 Fix SDK launcher bug
Asan: used destroyed temporary to construct '-numreservedcores'.
Changed logic to only pass to engine when input is actually a number and its value is > -1.
2023-01-21 15:34:37 +01:00
Kawe Mazidjatari
aed8656d56 SDK Launcher: slight UX improvement
Make UI more symmetrical by aligning elements more precisely together.
2023-01-21 14:59:42 +01:00
Kawe Mazidjatari
54f08bd887 Work-in-progress user command executor
* Added some getters in 'CBaseEntity' and 'CServerNetworkProperty'.
* Implemented 'CPlayer::SetTimeBase'.
* WIP implementation of 'CPlayer::RunNullCommand'.
2023-01-19 15:25:45 +01:00
Kawe Mazidjatari
91d55bb670 Launcher improvements
* Enabled '-forceborder' as this has been fixed in the engine.
* Enabled 'UpdateSDK', we will attempt to create an updater using a batch file.
* Less boilerplate code (will be reduced even more in the future).
* Renamed 'No border' to 'Borderless'.
2022-12-07 01:07:26 +01:00
Kawe Mazidjatari
f171d629d8 Disable '-forceborder' hook and light fix for launcher
Disabled as this code is only ran if the VideoConfig file is getting written. To fix this bug, the executable has to be patched. This will be documented and shipped in the next release.
2022-12-06 12:04:44 +01:00
Kawe Mazidjatari
ebf7bb5e0b Fix engine bug regarding forcing application borders
In Respawn's engine, the '-forceborder' command line parameter does the same thing as '-noborder'. '-forceborder' should remove the flags (nand) while '-noborder' should append the borderless flag. This code is an attempt to mitigate the problem. There was not enough bytes to assemble the nand operation for this code path without involving code caves or shifting.
2022-12-06 00:48:11 +01:00
Kawe Mazidjatari
484f6a779a Clear SDK Launcher console on launch
Clear session
2022-11-23 12:30:38 +01:00
Kawe Mazidjatari
3dc330e5df Add minimize button to SDK launcher 2022-10-20 14:23:24 +02:00
Kawe Mazidjatari
bc3b580525 Add logic for preventing recursive SDK initialization
This allows for loading the game with the client.dll without loading the main worker/sdk dll. gamesdk.dll is imported by the game executable, so we cannot circumvent its loading without some hacks, so instead, we just check if -noworkerdll is passed and not perform any init if its present.
2022-10-09 12:41:22 +02:00
Kawe Mazidjatari
8880f4e7f0 Rename "Enable Development" to "Enable Developer" in SDK launcher
Renamed to "Developer" as this is the name of the cvar, and the global define within the script API. This should express the intention more clearly.
2022-10-07 22:33:37 +02:00
Kawe Mazidjatari
b34446029b Set developer and cheats cvar when "Enable Cheats" is ticked
This is required for the in-game dev-menu to work.
2022-09-25 22:20:32 +02:00
Kawe Mazidjatari
524962ac44 Pass -dev from the launcher
Must be passed from the launcher, as this is removed from the configuration files for prod. Ticking the development box will pass '-dev' and '-devsdk'.
2022-09-22 22:25:32 +02:00
Kawe Mazidjatari
c269d297b8 Update basepanel.cpp 2022-09-21 20:41:10 +02:00
Kawe Mazidjatari
4fb39f13dd Increase 'Playlists file' text rect 2022-09-11 16:37:14 +02:00
Kawe Mazidjatari
fb7ab18a0b Minor spelling fixes 2022-09-11 00:19:31 +02:00
Kawe Mazidjatari
88b3336758 Many small code improvements and optimizations
* Use c++ methods as much as possible.
* Use enum types for accessing NavMesh objects from array.
* Use size_t for for loops when testing against size types.
* Don't compute strlen twice of more on the same string.
* Don't use unnecessary c string casts if there is a method with a std::string overload.
* Don't create string objects from string pointers if we could use them directly.
* Don't initialize RCON password twice on each change, and don't set if the new password equals the old.
2022-08-11 11:07:45 +02:00
Kawe Mazidjatari
e92b5d1300 General cleanup
Use c++ methods, remove unnecessary casts, unnecessary use of auto, etc..
2022-08-09 15:19:12 +02:00
Kawe Mazidjatari
d89967a5c2 Switch between -windowed and -fullscreen properly in launcher
Checking/Unchecking will now switch between them properly.
-forceborder does not work and the issue resides in the engine itself (it does the same bitshift operation as -windowed for some reason).
2022-08-04 12:56:05 +02:00
Kawe Mazidjatari
f0519efbb5 Fix SDKLauncher bug
Fix bug where SDK Launcher would display duplicate map names if server and client VPK's are installed within the same VPK directory.
2022-06-24 17:03:50 +02:00
Kawe Mazidjatari
5683a928d0 Default to no map and playlist 2022-06-14 01:44:13 +02:00
Kawe Mazidjatari
6c1f8da177 Launcher improvements
Load 'startup_launcher.cfg' when launching with the GUI launcher
2022-06-12 13:30:37 +02:00
Kawe Mazidjatari
bbe885689a Add define for compiling launcher for dedicated servers
This sets the selected mode to server by default upon launch
2022-06-06 01:31:20 +02:00
Kawe Mazidjatari
e2bc64a65e Overlap edge of text box with send button 2022-06-06 01:16:40 +02:00
Kawe Mazidjatari
f1f0ca35f8 Merge branch 'master' into indev 2022-06-02 02:02:36 +02:00
PixieCore
6ea1a8bebc Executing commands from launcher. 2022-05-31 18:05:43 +02:00
Kawe Mazidjatari
f2472e9275 Fix dev menu not showing up when launching with sv_cheats 2022-05-30 22:28:03 +02:00
Kawe Mazidjatari
4a512522ab Set hostname via 'hostname' ConVar instead 2022-05-29 02:32:00 +02:00
Kawe Mazidjatari
28ff12272f Cleanup 2022-05-27 14:39:43 +02:00
Kawe Mazidjatari
47d2e4c915 See description
* Added new function 'GetAvailablePlaylists' to all VM's.
* Moved function 'GetAvailableMaps' from UI VM to all VM's.
* Improved logic behind 'GetAvailableMaps'.
* Server browser and SQVM now rely on 'MOD_GetAllInstalledMaps'. This new function populates the global vector 'g_vAllMaps' with all installed maps.
* Improved 'KeyValues' structure to use union for shared members.
2022-05-27 02:08:51 +02:00
Kawe Mazidjatari
bf4d9d4ead Fix copy bug
Right click on element should now copy the selected index
2022-05-26 22:14:53 +02:00
Kawe Mazidjatari
e1799887d0 Finished GUI SDK Launcher
Implemented logic behind console frontend.
cleaned up sdklauncher.cpp (methods properly split up in class).
2022-05-26 22:04:50 +02:00
Kawe Mazidjatari
11652d015d SDK launcher progress
* Fixed compiler error when trying to compile SDK Launcher in debug (static lib was not compiled with static link runtime).
* Documented most stuff in basepanel.cpp
* Split some logic into dedicated functions in basepanel.cpp
* Implemented VDF parser from Matthias Moeller.
* Parse playlist file and load all playlists into the combo box.
2022-05-26 01:44:46 +02:00
Kawe Mazidjatari
4eaba9f5a2 Gui launcher work
Improved theme
Implemented dedicated server and client logic (gui side only)
2022-05-25 12:07:08 +02:00
Amos
d233262b79 Things 2022-05-24 19:26:05 +02:00
Kawe Mazidjatari
dacd307663 See description
* Finished designer code for launcher gui.
* Basic implementation of setting flags for host launch option.
* Check in 'CHostState::LoadConfig' if -launcher is below 1.. if condition is met the cfg's will be executed from 'CHostState::LoadConfig'.
* Added 'StringIsDigit' utility.
2022-05-24 02:23:37 +02:00
Kawe Mazidjatari
7225de1bd4 Finished designer code
Work in progress gui launcher
2022-05-23 19:14:12 +02:00