1153 Commits

Author SHA1 Message Date
Kawe Mazidjatari
9bf7660138 FileSystem improvements
* Added method 'FPrintf'.
* Shifted indexes back by 2 if <GAMEDLL_S3 (Anything <S3 doesn't have the 2 FeatureFlags initialization methods which shifts everything past index 10 back by 2).
2022-08-12 15:51:04 +02:00
Kawe Mazidjatari
aa9e7f25ed Fix CStdMemAlloc:Realloc()
Missing argument mistake.
2022-08-12 15:49:26 +02:00
Kawe Mazidjatari
3b160b6ac6 Free memory properly 2022-08-12 15:45:49 +02:00
Kawe Mazidjatari
52ee409f5f Use CIOStream for reading NavMesh and AIN files 2022-08-11 12:09:38 +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
ab097126ff Update playlists
Add the new maps.
2022-08-09 20:18:22 +02:00
Kawe Mazidjatari
1662816c5d Update utility.cpp 2022-08-09 18:22:50 +02:00
Kawe Mazidjatari
f9ea1b0f65 Rename bits.h/.cpp to fbits.h/.cpp (floatbits) 2022-08-09 18:07:32 +02:00
Kawe Mazidjatari
cdfc557452 CBanSystem optimizations
Pass by constant reference, const qualifiers, size_t loop iterators instead of implicit cast to int, extraneous cast to c-string, etc..
2022-08-09 17:57:43 +02:00
Kawe Mazidjatari
efd92f8ebc Move 'bansystem' from 'public' to 'networksystem' 2022-08-09 17:34:10 +02:00
Kawe Mazidjatari
329621c6ad Move all public headers into root of 'public' 2022-08-09 17:18:07 +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
0b4eb06dd2 Use compare method instead of strcmp on std::string 2022-08-09 14:01:29 +02:00
Kawe Mazidjatari
e97b4e53b2 More ConvertToWinPath/ConvertToUnixPath optimizations
Don't allocate static buffer on the stack, use the result string instead.
2022-08-09 14:00:51 +02:00
Kawe Mazidjatari
5334f31644 ConvertToWinPath and ConvertToUnixPath optimizations
* Don't compute strlen on each iteration.
2022-08-09 13:50:43 +02:00
Kawe Mazidjatari
f14d588d0a Improve readability
Null terminator for end of szBuf.
2022-08-09 13:08:58 +02:00
Kawe Mazidjatari
baeb343164 Improve pad removal of CPU brand identifier
Reverse scan CPU brand name until first non space character is found.
2022-08-09 13:05:12 +02:00
Kawe Mazidjatari
f015667f88 Light ImGui cleanup
* CTextLogger: Explicit cast return value of size() to int when testing int value against size_t.
* CBrowser: Run think and request thread on client.dll, but for the request, only the refresh.
2022-08-09 12:13:31 +02:00
Kawe Mazidjatari
ade1de41a9 Implement abstract class 'IEngine'
Also reversed one new method: IEngine::GetPlaylistCount (gets the number of playlists read from the playlists file, the other 2 unknown methods after this one also do stuff with the playlists, but rather on KeyValues level, one checks if something exists i think, the other returns a const char. Haven't ran these yet).
2022-08-09 11:53:33 +02:00
Kawe Mazidjatari
a399e1e190 Use 'std::string::compare' instead 2022-08-09 10:56:57 +02:00
Kawe Mazidjatari
f8807e4da9 Remove unnecessary cast to c string 2022-08-09 10:56:03 +02:00
Kawe Mazidjatari
73fba5fcb0 Add all WSA error codes 2022-08-09 10:55:31 +02:00
Kawe Mazidjatari
db90f3722c Add more information to global server/client global debug print 2022-08-09 10:55:13 +02:00
Kawe Mazidjatari
8c6ee8a834 Remove 'm' prefix from dll globals
Large commit.
2022-08-09 03:02:00 +02:00
Kawe Mazidjatari
9d06a02614 General cleanup
* Use Cbuf functions for executing commands in ImGui panels.
* Use const qualifiers for all vftable indexes.
2022-08-09 02:35:00 +02:00
Kawe Mazidjatari
0e5724c187 Update cleaner batch file
Added extra unused RPak file.
2022-08-09 00:47:12 +02:00
Kawe Mazidjatari
adec16ec02 Update playlists file
Add new map in lobby and ctf mode.
2022-08-09 00:46:40 +02:00
Kawe Mazidjatari
be01006ca0 Light cleanup of SQVM_PrintFunc 2022-08-08 18:17:40 +02:00
Kawe Mazidjatari
cc3d7d3afc Update comment regarding server VPK's 2022-08-08 17:51:35 +02:00
Kawe Mazidjatari
d96bb2deb0 Use correct size type format specifier in packetstore.cpp
Using %llu is also correct, but this is the standard approach.
2022-08-08 17:51:09 +02:00
Kawe Mazidjatari
8fde529e2b Print script errors to the console at all times
This change prints script errors and their callstack to the console even when sq_showvmoutput < 2 (this avoids confusion when running a dedicated server and the server 'appears' to shutdown the game on its own. You could also check the script log files which are written to at all times, but having some indication is nice).
2022-08-08 17:49:46 +02:00
Kawe Mazidjatari
fccff58d0b Don't force ServerBrowser visibility to 0 from cfg's
These are now automatically set.
2022-08-08 16:21:26 +02:00
Kawe Mazidjatari
12fed87378 Update playlists_r5_patch.txt 2022-08-08 12:14:45 +02:00
Kawe Mazidjatari
f97b347d88 Fix ConVar's and ConCommand's creation memory leak
Using the 'new' keyword and then assigning *this to *pNewConVar will lead to having 2 copies of the same constructed data, and one being used in the SDK whilst the other one being used by the engine.
We unfortunately cannot write the code exactly like the engine, as we hook the engine and dependent heavily on its global memalloc singleton.
This commit fixes the memory leak and allows the engine to free the memory as well whenever it wants to.
2022-08-08 01:40:28 +02:00
Kawe Mazidjatari
6cb44740f1 Use MAX_MAP_NAME constant for setting levelname in ServerBrowser 2022-08-08 00:33:07 +02:00
Kawe Mazidjatari
8328da706a Use engine's internal memalloc singleton for KeyValues methods 2022-08-08 00:32:25 +02:00
Kawe Mazidjatari
0c583d7522 Temporary fix for rpaks not loading from override dir 2022-08-06 22:17:47 +02:00
Marvin D
587b92659e dedicated compile fix for RTech changes. 2022-08-06 00:34:26 +02:00
PixieCore
946da4b2cc Fix variable names in RTech::OpenFile 2022-08-06 00:20:49 +02:00
PixieCore
1cd0ae5c87 General code cleanup, Rebuild and hooked RTech::OpenFile
* RTech std namespace removal
* RTech::OpenFile Rebuild.
* FileHandleTracker_t fully reversed, grabbing m_FileHandles from memory now.
* RTech::FindFreeSlotInFiles needs more research.
*
2022-08-06 00:16:11 +02:00
Kawe Mazidjatari
9dfa2da7aa Update playlists
Set 'survival_wallrun_enabled' and 'survival_wallrun_enabled' to 0 in defaults.

I get a lot of mixed opinions on this, there are people who prefer wallrunning and double jumping, but there are also people who don't want these enabled. I received advice to disable them for defaults for the time being (all br modes and firing range/training modes have them disabled, tdm/ctf and dev_default have them enabled).
2022-08-04 23:10:22 +02:00
Kawe Mazidjatari
cd2fe28490 Update config files
* Added new map in vpk build/extract configs.
* Explicitly set 'sv_cheats' to 0 for retail.
2022-08-04 23:06:57 +02:00
Kawe Mazidjatari
b496327380 Cleanup 2022-08-04 22:51:21 +02:00
Kawe Mazidjatari
c568995d56 Refresh server browser on startup
User gets to see all available servers directly without having to refresh first.
2022-08-04 22:49:30 +02:00
Kawe Mazidjatari
33b588b42e Private server improvements
* Don't clear the token string each time we get a response from the master server (it gets assigned each time anyways, so if the master server decides to change it the user will get the new one, this operation only happens once a second).
* Clear the token message when no longer hosting.
2022-08-04 22:44:23 +02:00
Kawe Mazidjatari
df81a1e277 Update rui_drawEnable help text 2022-08-04 17:56:54 +02:00
Kawe Mazidjatari
0cad187587 Fix client.dll compile errors 2022-08-04 17:52:34 +02:00
Kawe Mazidjatari
8f513a519f Properly implement ConCommand callbacks
COMMAND_COMPLETION_MAXITEMS and COMMAND_COMPLETION_ITEM_LENGTH are confirmed to be 128 (original code is 64).
New register func sets the callback bit fields accordingly (no longer hardcoded).
2022-08-04 17:37:30 +02:00
Kawe Mazidjatari
ea5f17b4ca Light cleanup
* Moved ConVar usage text that where part of the help string to the usage string parameter.
* Flagged ConVar 'bhit_abs_origin' as FCVAR_DEVELOPMENTONLY | FCVAR_REPLICATED.
* Flagged ConCommand 'bhit' as FCVAR_DEVELOPMENTONLY | FCVAR_GAMEDLL.
* Check 'bhit_enable' before running the 'bhit' command callback.
* Fixed spelling in a few area's.
2022-08-04 16:34:23 +02:00
Kawe Mazidjatari
418bd2d679 Improve NavMesh poly blue tone color 2022-08-04 15:41:45 +02:00