2372 Commits

Author SHA1 Message Date
Kawe Mazidjatari
596e827352 Add platform defines for endianness 2023-04-05 23:01:46 +02:00
Kawe Mazidjatari
a5489f16b6 Fix small oversight
Should be '+1' as 'position' could be 0.
2023-04-05 22:58:26 +02:00
Kawe Mazidjatari
e76f5b98c8 CLZSS: Fix bug causing iterator to go out of bounds
Check if 'position' exceeds buffer size.
2023-04-05 22:31:37 +02:00
Kawe Mazidjatari
dbe1850ec1 Add LZSS implementation to SDK 2023-04-05 21:38:28 +02:00
Kawe Mazidjatari
69775ca234 CPackedStore: Improve symbol naming 2023-04-05 20:09:23 +02:00
Kawe Mazidjatari
dda78ed36e
Update persona name pattern
Add '-' character to allowed characters in persona name.
2023-04-05 15:32:00 +02:00
Kawe Mazidjatari
697d11cccb Improve VPKPair_t constructor
* Take string object by const reference.
* Emit warnings when locale or target specified by user isn't supported.
2023-04-04 00:41:53 +02:00
Kawe Mazidjatari
6da5206282 CPackedStore: Fix file handle bug
VPK directory file handle was never closed properly in 'VPKDir_t::Init()';
2023-04-03 22:48:29 +02:00
Kawe Mazidjatari
1f1a487af9 CPackedStore: Fix bug and improve code readability
Moved deduplication code to a separate function. Unnested packing and unpacking code a bit more.
2023-04-03 22:46:10 +02:00
Kawe Mazidjatari
081c548bdd Remove unnecessary member from 'VPKChunkDescriptor_t' 2023-04-03 21:16:15 +02:00
Kawe Mazidjatari
dc0fba9319 CPackedStore: Rename 'useDataSharing' to 'deDuplicate'
More descriptive in what it does (deduplication of existing copies).
2023-04-03 20:08:36 +02:00
Kawe Mazidjatari
b5bd4296e9 CPackedStore: Dynamically allocate source/destination buffers
This allows for multithreading the VPK build process.
2023-04-03 20:02:56 +02:00
Kawe Mazidjatari
475262fc24 Use C-style format specifiers in CPakFile
Enforce consistency within codebase.
2023-04-03 19:12:15 +02:00
Kawe Mazidjatari
b8d97d0d1c Cleanup 'Mod_GetAllInstalledMaps'
Light cleanup
2023-04-03 18:38:36 +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
7de0ed24b1 Update CClient class
Members 'm_szServerName' and 'm_szClientName' are both 256 bytes in size.
2023-04-03 18:37:35 +02:00
Kawe Mazidjatari
3463d0070f Improve text formatting in 'Host_Status_PrintClient'
Better 'status' command output.
2023-04-03 14:56:03 +02:00
Kawe Mazidjatari
fe0cce731b Explicitly disable certain warnings in code
This code is good as-is, they cannot be adjusted to suppress the warnings while still guaranteeing its functionality.
2023-04-03 14:55:16 +02:00
Kawe Mazidjatari
d620a7efe8 Fix compiler warnings in cppnet
Constant expressions.
2023-04-03 14:53:17 +02:00
Kawe Mazidjatari
c729b6faa8 Fix symbol shadowing warnings in VDF parser 2023-04-03 14:52:22 +02:00
Kawe Mazidjatari
40f065bc1d Fix warnings in cppkore 2023-04-03 14:51:45 +02:00
Kawe Mazidjatari
a857403b9e Fix type conversion warning in netconsole tool 2023-04-03 14:51:18 +02:00
Kawe Mazidjatari
a79ed2f52f Fix bug in navmesh tool caused by transforming string
Value passed into 'std::tolower' must be unsigned.
2023-04-03 14:50:30 +02:00
Kawe Mazidjatari
5551909ac7 Explicitly cast to types to suppress warnings in navmesh tool 2023-04-03 14:49:18 +02:00
Kawe Mazidjatari
e9cbe34a95 Remove dead code from navmesh tool 2023-04-03 14:48:38 +02:00
Kawe Mazidjatari
9a1343b231 Fix symbol shadowing warnings in navmesh tool 2023-04-03 14:47:41 +02:00
Kawe Mazidjatari
8809f17504 Compile NetMsg out entirely for dedicated 2023-04-03 14:34:46 +02:00
Kawe Mazidjatari
87831050e9 Fix SDK launcher compiler warning
Unused param.
2023-04-03 13:12:36 +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
4cff696133 Cast results back to a float
This suppresses a compiler 'type conversion' warning.
2023-04-03 11:22:55 +02:00
Kawe Mazidjatari
53c693f6e1 Avoid creating a unnecessary copy
Avoid copying the string out of the vector.
2023-04-03 11:21:31 +02:00
Kawe Mazidjatari
a1f7cc9a0d Make code compatible with older C++ versions
Made compatible with earlier C++ versions without having verbose compiler warnings.
2023-04-03 01:41:46 +02:00
Kawe Mazidjatari
d8cc85da6b Fix symbol shadowing warnings
'uint' is defined in pseudodefs.h, but also in format.h. The definition in pseudodefs.h shadows the one in format.h. Since the one in format.h is local, it has been renamed to 'uinty' to avoid this behavior.
2023-04-03 01:40:21 +02:00
Kawe Mazidjatari
e79ed464e9 Improve HexDump utility
* Improved formatting.
* Get default logger directly instead of using a string identifier.
* Promoted size type to 'size_t'.
* Removed extraneous static variables.
2023-04-02 21:51:15 +02:00
Kawe Mazidjatari
0c5a24152e /W4: Fix name shadowing warnings
Parameter 'hostname' shadows global cvar 'hostname'.
2023-04-02 17:40:15 +02:00
Kawe Mazidjatari
417365fa77 /W4: Fix type truncation warnings 2023-04-02 17:39:16 +02:00
Kawe Mazidjatari
b0d2665550 /W4: Fix compiler compatibility
Clang doesn't support function-style casts with types containing a space.
2023-04-02 17:34:42 +02:00
Kawe Mazidjatari
4e7693bae6 /W4: Fix name shadowing warnings 2023-04-02 17:25:18 +02:00
Kawe Mazidjatari
bae2e0a99c /W4: Fix implicit type conversion warnings
Explicitly convert them to avoid any warnings or potential bugs.
2023-04-02 17:23:53 +02:00
Kawe Mazidjatari
7727f13efa /W4: Fix return value truncation warning
Fix value truncation warning caused by returning 'CServerNetworkProperty::m_edict' in 'CServerNetworkProperty::GetEdict'. type has been demoted to actual type 'edict_t'.
2023-04-02 17:21:21 +02:00
Kawe Mazidjatari
42b3e49840 /W4: Properly pack server animation structures
Manually add fields to align structure properly. This suppresses many pesky compiler warnings.
2023-04-02 17:19:13 +02:00
Kawe Mazidjatari
a63d66b667 /W4: Fix unreferenced symbol bugs
Return value of 'g_pMasterServer->GetServerByToken' was never checked. Added check to improve the error messages that could be displayed.
2023-04-02 17:14:29 +02:00
Kawe Mazidjatari
2d87e082f1 /W4: Fix unreferenced symbol bugs
Fixed bugs that was caused by symbols that were defined, but never used.
* 'UnsignedIntConvertToFltSIMD' never used its input parameter.
* The results from the call to 'sq_call' were never checked, so if a failure took place, it was never logged.
* 'CheckForWarnings' never used the 'context' parameter, but this was required as context types of 'eDLL_T::SYSTEM_WARNING' or 'context == eDLL_T::SYSTEM_ERROR', should be returning the warning/error color as well.
* Renamed 'GetHiddenServerConnectStatus' to 'GetHiddenServerName' and added more dedicated error handling within its logic, as the results from the call 'g_pMasterServer->GetServerByToken' was never checked.
2023-04-02 17:11:14 +02:00
Kawe Mazidjatari
ae431c6ac2 /W4: Fix unreferenced symbol warnings
Fix verbose unreferenced symbol warnings.
2023-04-02 17:02:04 +02:00
Kawe Mazidjatari
a71839f13a /W4: Fix potentially non zero-terminated string
The prior call to 'strcpy' might not zero-terminated string, explicitly perform this operation to prevent this bug.
2023-04-02 16:56:54 +02:00
Kawe Mazidjatari
e1f0e72af4 /W4: Fix type demotion warnings
Explicitly demote to 'int' to suppress pesky compiler warnings.
2023-04-02 16:03:01 +02:00
Kawe Mazidjatari
24a06f28c6 /W4: Fix verbose compiler warnings in 'Debug' build mode
Warnings caused by symbol ambiguity. Fixed by removing the duplicate definition in 'platform.h'.
2023-04-02 15:58:55 +02:00
Kawe Mazidjatari
922709f4d9 /W4: Fix verbose compiler warnings caused by incorrect type conversion
Fixed bug caused by incorrect type conversion. Type should be as wide as the type used for 'CUtlMemory::m_nAllocationCount', which is 64-bits on this particular implementation.
2023-04-02 15:51:08 +02:00
Kawe Mazidjatari
09553e3e2c /W4: Fix incorrect instantiation of string transformer
The case transformation didn't work properly as the char value was not casted to an unsigned char, causing undefined behavior. Added new utility function 'IsEqualNoCase' which allows for comparing 2 strings case insensitively. Code has been tested with module strings containing irregular cases, and was still able to obtain the imported function address correctly.
2023-04-02 15:16:32 +02:00
Kawe Mazidjatari
978f108526 /W4: Fix incorrect type cast
Values passed to functions from '<cctype>' must be representable as unsigned chars to avoid undefined behavior.
2023-04-02 14:58:02 +02:00